Fix wasCalledWith matcher.

This commit is contained in:
Christian Williams
2009-11-12 15:03:55 -05:00
parent 3b92b9bb79
commit 98e86817bf
2 changed files with 23 additions and 21 deletions

View File

@@ -224,7 +224,7 @@ jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.matcherFn_('wasCalle
throw new Error('Expected a spy, but got ' + jasmine.Matchers.pp(this.actual) + '.');
}
return this.env.contains_(this.actual.argsForCall, arguments);
return this.env.contains_(this.actual.argsForCall, jasmine.util.argsToArray(arguments));
},
message: function() {
return "Expected spy to have been called with " + jasmine.pp(arguments) + " but was called with " + this.actual.argsForCall;