I found this, sounds like what you wanted.
/**
* 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);
*/
jasmine.Spy.prototype.reset = function() {
this.wasCalled = false;
this.callCount = 0;
this.argsForCall = [];
this.calls = [];
this.mostRecentCall = {};
};
:)
On Aug 24, 1:51 pm, Davis Frank <
dwfr...@pivotallabs.com> wrote:
> Interesting idea. We don't have plans, but if you'd like to contribute a
> patch with specs, we'll take a look.
>
> --dwf
>
> On Tue, Aug 24, 2010 at 8:53 AM, efleming969 <
efleming...@gmail.com> wrote:
> > Are there plans to add a reset function for a spyObj?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Jasmine" group.
> > To post to this group, send email to
jasmi...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
jasmine-js+...@googlegroups.com<
jasmine-js%2Bunsu...@googlegroups.com>
> > .