Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c0a0781

Browse files
committedFeb 12, 2013
chore(matchers): fix hasBeenCalledOnceWith matcher
the error message was wrong and misleading
1 parent 035e013 commit c0a0781

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎test/matchers.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -109,24 +109,24 @@ beforeEach(function() {
109109
if (this.actual.callCount != 1) {
110110
if (this.actual.callCount == 0) {
111111
return [
112-
'Expected spy ' + this.actual.identity + ' to have been called with ' +
112+
'Expected spy ' + this.actual.identity + ' to have been called once with ' +
113113
jasmine.pp(expectedArgs) + ' but it was never called.',
114114
'Expected spy ' + this.actual.identity + ' not to have been called with ' +
115115
jasmine.pp(expectedArgs) + ' but it was.'
116116
];
117117
}
118118

119119
return [
120-
'Expected spy ' + this.actual.identity + ' to have been called with ' +
121-
jasmine.pp(expectedArgs) + ' but it was never called.',
122-
'Expected spy ' + this.actual.identity + ' not to have been called with ' +
120+
'Expected spy ' + this.actual.identity + ' to have been called once with ' +
121+
jasmine.pp(expectedArgs) + ' but it was called ' + this.actual.callCount + ' times.',
122+
'Expected spy ' + this.actual.identity + ' not to have been called once with ' +
123123
jasmine.pp(expectedArgs) + ' but it was.'
124124
];
125125
} else {
126126
return [
127-
'Expected spy ' + this.actual.identity + ' to have been called with ' +
127+
'Expected spy ' + this.actual.identity + ' to have been called once with ' +
128128
jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall),
129-
'Expected spy ' + this.actual.identity + ' not to have been called with ' +
129+
'Expected spy ' + this.actual.identity + ' not to have been called once with ' +
130130
jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall)
131131
];
132132
}

0 commit comments

Comments
 (0)