DEV Community

Discussion on: You don't know TDD

Collapse
 
floverdevel profile image
Ellis

When written correctly, tests created with TDD are supposed to help refactoring. You could change the implementation details and the tests should still be all green.

If you end up having problems refactoring BECAUSE of the unit tests the it's probably because you are testing the implementation details instead of testing the behavior of the system or behavior of the component. One hint of that is when you have a lot of mocks in your tests.