travis-web/assets/scripts/spec/spec_helper.coffee
Piotr Sarnacki 25079b8d79 Move hacks for phantomjs to spec.html
This ain't pretty, but I just want to see if it helps to fix specs on
phantomjs, I may move them to separate file and take into account in
Assetfile later.
2013-03-07 01:59:15 +01:00

17 lines
405 B
CoffeeScript

minispade.require 'app'
@app = (url) ->
# TODO: this should wait till app is initialized, not some
# arbitrary amount of time
waits(50)
runs ->
Travis.reset()
url = "/#{url}" unless url.match /^\//
Travis.__container__.lookup('router:main').handleURL(url)
now = -> new Date('2012-07-02T00:03:00Z')
$.timeago.settings.nowFunction = -> now().getTime()
Travis.currentDate = now