diff --git a/src/base.js b/src/base.js index fe77e01..682438a 100755 --- a/src/base.js +++ b/src/base.js @@ -189,6 +189,7 @@ jasmine.Spy = function(name) { * mySpy.argsForCall[1] = [7, 8]; */ this.argsForCall = []; + this.calls = []; }; /** @@ -283,6 +284,7 @@ jasmine.Spy.prototype.reset = function() { this.wasCalled = false; this.callCount = 0; this.argsForCall = []; + this.calls = []; this.mostRecentCall = {}; }; @@ -292,13 +294,10 @@ jasmine.createSpy = function(name) { spyObj.wasCalled = true; spyObj.callCount++; var args = jasmine.util.argsToArray(arguments); - //spyObj.mostRecentCall = { - // object: this, - // args: args - //}; spyObj.mostRecentCall.object = this; spyObj.mostRecentCall.args = args; spyObj.argsForCall.push(args); + spyObj.calls.push({object: this, args: args}); return spyObj.plan.apply(this, arguments); };