3 ms·
"Following strict TDD doesn't prevent this" Actually, following strict TDD does prevent this. You must see a test fail before you make it pass. It goes "Red -
by swanson 14y ago
"Following strict TDD doesn't prevent this"
Actually, following strict TDD does prevent this.
You must see a test fail before you make it pass. It goes "Red -> Green -> Refactor" not just "Green -> Refactor". Even if a valid test case passes on the first time, one should modify the test (or the code) in a known way to cause an expected failure.
Your premise (tests are only as correct as the spec of initial assumptions) is correct, but your supporting example is not.