3 ms·
That's where TDD falls down, iin fact. In TDD you first write a black-box test which fails, and then make it pass by fiddling with the interior of the white box
by kazinator 4y ago
That's where TDD falls down, iin fact. In TDD you first write a black-box test which fails, and then make it pass by fiddling with the interior of the white box. So, good, you then have a nice white-box test. The problem is with the refactoring step. Refactoring keeps the tests working, but some of them turn into blackbox tests which no longer relate to the internals.
Like say you develop a function by adding cases, TDD style. Then you see there is a generality there and refactor so the individual cases go away. The tests probing those cases still have validity, but no value.