Re:Mocks Aren't Stubs (2007)
by wahnfrieden on Monday November 14, 2016 @09:00PM
(#12955044)
It means that you lose out on a lot of value from your test suite: besides verifying behavior on new code, tests also allow you to confidently refactor existing code. If your tests test implementation via mocking, and break when you refactor your code in ways that preserve the intended behaviors, then you're unable to confidently refactor.
Mocks lead you down a path where developers will eventually feel too scared or fatigued to refactor anything substantial.
Mocks lead you down a path where developers will eventually feel too scared or fatigued to refactor anything substantial.