Re:Dependency injection is not a virtue
by kybernetikos on Sunday January 06, 2013 @03:23PM
(#5017581)
Monkey patching in tests is particularly problematic when you're running a number of tests one after the other. The number of times I've found tests that appear to be testing something and going green, but are actually doing nothing because they run after some other test that has modified a global and not put it back again afterwards.
These problems can be very difficult to find.