spyObj = function() {
    spyObj.wasCalled = true;
    spyObj.callCount++;
    var args = jasmine.util.argsToArray(arguments);
    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);
  }
Resets all of a spy's the tracking variables so that it can be used again.

@example
spyOn(foo, 'bar');

foo.bar();

expect(foo.bar.callCount).toEqual(1);

foo.bar.reset();

expect(foo.bar.callCount).toEqual(0);