diff options
author | kaeff <hi@kaeff.net> | 2015-09-16 02:32:01 +0200 |
---|---|---|
committer | kaeff <hi@kaeff.net> | 2015-09-16 02:36:09 +0200 |
commit | cae90e93df0a9c028881a7a7a9935ec11ea07378 (patch) | |
tree | 414ec576173d0e389ceda8813a37bd5010a653b3 /spec/lib/jasmine-sinon.js | |
parent | dacd2f218a3774bd200f17c7e9274088043a25ef (diff) |
Remove jasmine html runner & outdated libs
Diffstat (limited to 'spec/lib/jasmine-sinon.js')
-rw-r--r-- | spec/lib/jasmine-sinon.js | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/spec/lib/jasmine-sinon.js b/spec/lib/jasmine-sinon.js deleted file mode 100644 index 2b7a9e0..0000000 --- a/spec/lib/jasmine-sinon.js +++ /dev/null @@ -1,43 +0,0 @@ -(function(global) { - - var spyMatchers = "called calledOnce calledTwice calledThrice calledBefore calledAfter calledOn alwaysCalledOn calledWith alwaysCalledWith calledWithExactly alwaysCalledWithExactly".split(" "), - i = spyMatchers.length, - spyMatcherHash = {}, - unusualMatchers = { - "returned": "toHaveReturned", - "alwaysReturned": "toHaveAlwaysReturned", - "threw": "toHaveThrown", - "alwaysThrew": "toHaveAlwaysThrown" - }, - - getMatcherFunction = function(sinonName) { - return function() { - var sinonProperty = this.actual[sinonName]; - return (typeof sinonProperty === 'function') ? sinonProperty.apply(this.actual, arguments) : sinonProperty; - }; - }; - - while(i--) { - var sinonName = spyMatchers[i], - matcherName = "toHaveBeen" + sinonName.charAt(0).toUpperCase() + sinonName.slice(1); - - spyMatcherHash[matcherName] = getMatcherFunction(sinonName); - }; - - for (var j in unusualMatchers) { - spyMatcherHash[unusualMatchers[j]] = getMatcherFunction(j); - } - - global.sinonJasmine = { - getMatchers: function() { - return spyMatcherHash; - } - }; - -})(window); - -beforeEach(function() { - - this.addMatchers(sinonJasmine.getMatchers()); - -}); |