Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixes a problem with sandboxes not restoring stubs when a whole object was stubbed #97

Merged
merged 4 commits into from Mar 17, 2012

Conversation

Projects
None yet
2 participants
Contributor

KonradHolowinski commented Mar 16, 2012

As discussed in:

cjohansen#95

Modified collections to keep methods directly in fakes.

KonradHolowinski added some commits Mar 13, 2012

Fixes a problem with sandboxes not restoring stubs when a whole objec…
…t was

stubbed

All object methods stub restore failing tests

Added object restore wrapper allows restoring all methods of an object while sanbox is restored
Fixes collection object stub return value
Fixed collection stub to return valid object

Added test verifying proper collection stubbing behavior

Testing collections stub return values
Contributor

cjohansen commented Mar 17, 2012

Cool, thanks! I just noticed that your prior solution would've failed in cases where methods were added to objects after they were stubbed too (the restore method on functions were assumed). Looking good now.

cjohansen added a commit that referenced this pull request Mar 17, 2012

Merge pull request #97 from KonradHolowinski/master
Fixes a problem with sandboxes not restoring stubs when a whole object was stubbed

@cjohansen cjohansen merged commit 3eba59d into sinonjs:master Mar 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment