Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mocha: Update package.json Moved tests to mocha/chai and removed travis-ci jasmine spec runner in favour of phantomjs
- Loading branch information
Showing
20 changed files
with
783 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
[submodule "lib/jasmine"] | ||
path = lib/jasmine | ||
url = https://github.com/pivotal/jasmine.git | ||
[submodule "lib/ender"] | ||
path = lib/ender | ||
url = https://github.com/ender-js/Ender.git | ||
[submodule "lib/mocha"] | ||
path = lib/mocha | ||
url = git://github.com/visionmedia/mocha.git | ||
[submodule "lib/chai"] | ||
path = lib/chai | ||
url = git://github.com/chaijs/chai.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
language: ruby | ||
rvm: | ||
- 1.9.3 | ||
bundler_args: --without development | ||
before_script: | ||
- "git submodule update --init" | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" | ||
- bundle exec rackup & | ||
- sleep 5 | ||
script: phantomjs ./lib/test-helpers/run_jasmine_test.coffee "http://localhost:9292/src/tests/index.html" | ||
notifications: | ||
email: false | ||
script: | ||
- "phantomjs ./lib/test-helpers/run-mocha.js file://localhost/$(pwd)/src/tests/index.html#ci" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule jasmine
deleted from
06c900
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
A shim for non ES5 supporting browsers (phantomjs). | ||
Adds function bind to Function prototype, so that you can do partial application. | ||
Works even with the nasty thing, where the first word is the opposite of extranet, the second one is the profession of Columbus, and the version number is 9, flipped 180 degrees. | ||
*/ | ||
|
||
Function.prototype.bind = Function.prototype.bind || function(to){ | ||
// Make an array of our arguments, starting from second argument | ||
var partial = Array.prototype.splice.call(arguments, 1), | ||
// We'll need the original function. | ||
fn = this; | ||
var bound = function (){ | ||
// Join the already applied arguments to the now called ones (after converting to an array again). | ||
var args = partial.concat(Array.prototype.splice.call(arguments, 0)); | ||
// If not being called as a constructor | ||
if (!(this instanceof bound)){ | ||
// return the result of the function called bound to target and partially applied. | ||
return fn.apply(to, args); | ||
} | ||
// If being called as a constructor, apply the function bound to self. | ||
fn.apply(this, args); | ||
} | ||
// Attach the prototype of the function to our newly created function. | ||
bound.prototype = fn.prototype; | ||
return bound; | ||
}; |
Oops, something went wrong.