[mocha-developer] Removing/overriding/unstubbing a stub?
jamesmead44 at gmail.com
Thu Sep 13 07:32:23 EDT 2007
Personally I'm not a big fan of the setup method. I agree with Duncan
that two separate test cases is one way to go. Alternatively you could
move the stubbing out of the setup method and into invidual test
methods and only add it to the ones that need it - I think this has
the benefit of being clearer and more explicit, but it will depend a
bit on how many test methods need the stubbed method.
There has been an item on the todo list for a long time about being
able to "unstub" a method (I think it was first raised by Kevin
Clark), but not many people have asked for it and we (at Reevoo)
haven't needed it.
More information about the mocha-developer