Hacker News new | ask | show | jobs
by hacking_again 3179 days ago
The problem with TDD is that if you have a lot of tests, then when you want to change your code you have to change a lot of tests. This leads to inertia against changing your code, and then ultimately when you do need to change things, you end up just rewriting your tests so that they pass to match the new code, i.e. the new code becomes the test.
1 comments

That's why it's important to have the majority of your tests be true unit tests that use doubles for their collaborators and have your classes adhere to single responsibility principle and open closed principle. That way you should only have to adjust very few acceptance tests.