[mocha-developer] mocking singletons

Jonathan Leighton j at jonathanleighton.com
Wed Aug 22 04:29:13 EDT 2007

On Tue, 2007-08-21 at 12:28 -0500, Justin Perkins wrote:
> > On Aug 21, 2007, at 3:45 AM, Jonathan Leighton wrote:
> > This is how I did it:
> > http://jonathanleighton.com/blog/testing-singleton-classes
> Can I define a teardown method in the test_helper or would your  
> solution require a per-test-case teardown method to reload the  
> singleton?

I'm not sure why you'd want to do that? You'd only need to "reload" the
Singleton when you are testing it, not in every single test. Maybe I've
misunderstood something...


More information about the mocha-developer mailing list