cjohansen/Sinon.JS — pull request #95 by KonradHolowinski (2012-03-15 17:49:06+00:00)
Title: Fixes a problem with sandboxes not restoring stubs when a whole object was stubbed

Hi.

I've been working with the sandboxes lately and I've found an issue with restoring the stubbed objects when the sandbox.restore() is called.
The sandbox.restore() wasn't restoring the methods when a whole object was stubbed.

Fix included in pull request.
Tests included also.

I've chosen to add a wrapper on a stubbed object in collection and leave the actual stubs restore method intact.

This was previously requested in https://github.com/cjohansen/Sinon.JS/pull/93
The previous pull message had some argumentation that seems invalid after a more detailed look at the code.
If you think otherwise let me know.