[mocha-developer] mocking singletons

Jonathan Leighton j at jonathanleighton.com
Tue Aug 21 04:45:11 EDT 2007


On Mon, 2007-08-20 at 20:26 -0500, Justin Perkins wrote:
> How can I safely mock a singleton without the mocked method living on  
> outside the scope of the test method?

This is how I did it:
http://jonathanleighton.com/blog/testing-singleton-classes



More information about the mocha-developer mailing list