diff options
author | Azul <azul@leap.se> | 2012-07-20 10:56:36 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-07-20 10:56:36 +0200 |
commit | 50de80c5e817476ac95a096c718a66f5555fcd05 (patch) | |
tree | e05a25868a999557e2788a91f41da3a5a8a1a0b0 /javascript/spec/lib/jasmine-sinon.js | |
parent | 07fe2d8976db0ec267bd57ded90778f0d7695478 (diff) |
INCOMPATIBLE: major restructuring of the repository
* removed Django code - we're keeping the tests - so I hope the two can still be used together
* removed js packer - everyone has their own packaging strategy these days
* cleaned up the repository - we only have js so javascript directory does not make much sense
Diffstat (limited to 'javascript/spec/lib/jasmine-sinon.js')
-rw-r--r-- | javascript/spec/lib/jasmine-sinon.js | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/javascript/spec/lib/jasmine-sinon.js b/javascript/spec/lib/jasmine-sinon.js deleted file mode 100644 index 2b7a9e0..0000000 --- a/javascript/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()); - -}); |