2 ms·
This seems to assume that the tests will be higher quality than the problematic code in the first place. It’s actually commonplace to see tests coupled to inter
by jen20 7y ago
This seems to assume that the tests will be higher quality than the problematic code in the first place. It’s actually commonplace to see tests coupled to internal implementation details of production code, which makes refactoring very hard.
The idea of TDD (mostly lost to hype and consultants) is that you change _EITHER_ the tests or the code in each operation. This allows you to use one as a control against the other. If you change both, you prove that different tests pass against different code, which is substantially less useful. Unfortunately if tests are coupled to internal state, getting code to even compile without modifying both sides of the production/test boundary is difficult after a refactor.
- geezerjay 7y ago> This seems to assume that the tests will be higher quality than the problematic code in the first place. If the problem lies with probematic code then tests are not the problem. At most they're just yet another way that problematic code affects the problem. Let's put it this way: would the problems go away if the tests were ripped out?