cjohansen/Sinon.JS — pull request #375 by pimterry (2013-12-24 17:35:18+00:00)
Title: Refactor fix and re-enable ignored global timer restore test

This test was ignored, as it needs to test behaviour where methods may or may not be present on the global object, and to do so it deletes methods such as setTimeout from the global object, which some browsers (e.g. Chrome) will reject.

This patch makes the test clearer by splitting the two cases into two, and tests it by attaching and restoring 'tick', rather than setTimeout etc, so it doesn't conflict with any existing global methods, and we can test both the relevant cases without the JS host environment getting upset.