cjohansen/Sinon.JS — pull request #363 by scinos (2013-12-12 23:04:15+00:00)
Title: When creating a sandbox, do not overwrite existing properties when injecting properties into an object

The problem:
Currently, we have thousands of QUnit + Sinon tests. Some of them are using sandboxes, created in the setup and saved into "this.sandbox". We would like to use sinon-qunit, but it breaks those tests that are using sandboxes ("this.sandbox" is overwritten therefore we cannot restore the stubs created in the setup using the original sandbox)

The fix:
When injecting properties into 'this', only inject the property if it is not already there. In our case, tests that were previously using "this.sandbox" can still use that object to create/restore stubs.