diff options
| author | Igor Minar | 2013-02-11 21:24:49 -0800 |
|---|---|---|
| committer | Igor Minar | 2013-02-20 08:44:53 -0800 |
| commit | 701d61080a1a5b5084a7fb106086ce6582e16a9e (patch) | |
| tree | 07f4aabfd5b6176de50a254f84aeff9530e6bcd9 | |
| parent | a8cc4497063118c766bdfa9464c9cbfc59413a81 (diff) | |
| download | angular.js-701d61080a1a5b5084a7fb106086ce6582e16a9e.tar.bz2 | |
chore(matchers): fix hasBeenCalledOnceWith matcher
the error message was wrong and misleading
| -rw-r--r-- | test/matchers.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/matchers.js b/test/matchers.js index 6bfed257..3630c3b1 100644 --- a/test/matchers.js +++ b/test/matchers.js @@ -109,7 +109,7 @@ beforeEach(function() { if (this.actual.callCount != 1) { if (this.actual.callCount == 0) { return [ - 'Expected spy ' + this.actual.identity + ' to have been called with ' + + 'Expected spy ' + this.actual.identity + ' to have been called once with ' + jasmine.pp(expectedArgs) + ' but it was never called.', 'Expected spy ' + this.actual.identity + ' not to have been called with ' + jasmine.pp(expectedArgs) + ' but it was.' @@ -117,16 +117,16 @@ beforeEach(function() { } return [ - 'Expected spy ' + this.actual.identity + ' to have been called with ' + - jasmine.pp(expectedArgs) + ' but it was never called.', - 'Expected spy ' + this.actual.identity + ' not to have been called with ' + + 'Expected spy ' + this.actual.identity + ' to have been called once with ' + + jasmine.pp(expectedArgs) + ' but it was called ' + this.actual.callCount + ' times.', + 'Expected spy ' + this.actual.identity + ' not to have been called once with ' + jasmine.pp(expectedArgs) + ' but it was.' ]; } else { return [ - 'Expected spy ' + this.actual.identity + ' to have been called with ' + + 'Expected spy ' + this.actual.identity + ' to have been called once with ' + jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall), - 'Expected spy ' + this.actual.identity + ' not to have been called with ' + + 'Expected spy ' + this.actual.identity + ' not to have been called once with ' + jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall) ]; } |
