Enable js testing on travis
This commit is contained in:
parent
14b5d4c9b9
commit
3b3de51017
11
.travis.yml
11
.travis.yml
|
@ -1,7 +1,16 @@
|
||||||
language: ruby
|
language: ruby
|
||||||
rvm:
|
rvm:
|
||||||
- 1.9.3
|
- 1.9.3
|
||||||
script: "bundle exec rspec spec"
|
before_install:
|
||||||
|
- wget http://phantomjs.googlecode.com/files/phantomjs-1.7.0-linux-i686.tar.bz2
|
||||||
|
- tar -xf phantomjs-1.7.0-linux-i686.tar.bz2
|
||||||
|
- sudo rm -rf /usr/local/phantomjs
|
||||||
|
- sudo mv phantomjs-1.7.0-linux-i686 /usr/local/phantomjs
|
||||||
|
before_script:
|
||||||
|
- bundle exec rakep
|
||||||
|
- bundle exec rackup -s puma -p 5000 -D
|
||||||
|
- sleep 3
|
||||||
|
script: "bundle exec rspec spec && ./run_jasmine.coffee http://localhost:5000/spec.html"
|
||||||
notifications:
|
notifications:
|
||||||
irc: "irc.freenode.org#travis"
|
irc: "irc.freenode.org#travis"
|
||||||
campfire:
|
campfire:
|
||||||
|
|
|
@ -30,3 +30,26 @@ _Date = Date
|
||||||
@Date = (date) ->
|
@Date = (date) ->
|
||||||
new _Date(date || '2012-07-02T00:03:00Z')
|
new _Date(date || '2012-07-02T00:03:00Z')
|
||||||
@Date.UTC = _Date.UTC
|
@Date.UTC = _Date.UTC
|
||||||
|
|
||||||
|
# hacks for missing features in webkit
|
||||||
|
unless Function::bind
|
||||||
|
Function::bind = (oThis) ->
|
||||||
|
|
||||||
|
# closest thing possible to the ECMAScript 5 internal IsCallable function
|
||||||
|
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable") if typeof this isnt "function"
|
||||||
|
aArgs = Array::slice.call(arguments, 1)
|
||||||
|
fToBind = this
|
||||||
|
fNOP = ->
|
||||||
|
|
||||||
|
fBound = ->
|
||||||
|
fToBind.apply (if this instanceof fNOP and oThis then this else oThis), aArgs.concat(Array::slice.call(arguments_))
|
||||||
|
|
||||||
|
fNOP.prototype = @.prototype
|
||||||
|
fBound.prototype = new fNOP()
|
||||||
|
fBound
|
||||||
|
|
||||||
|
window.history.state = {}
|
||||||
|
oldPushState = window.history.pushState
|
||||||
|
window.history.pushState = (state, title, href) ->
|
||||||
|
window.history.state = state
|
||||||
|
oldPushState.apply this, arguments
|
||||||
|
|
Loading…
Reference in New Issue
Block a user