4 ms·
>that's generally a sign that your tests and your code are too tightly coupled. I think that's the point. These are tests written specifically to help with the
by snappy173 11y ago
>that's generally a sign that your tests and your code are too tightly coupled.
I think that's the point. These are tests written specifically to help with the transition from the old to the new code. They are pretty tightly coupled to both versions in that sense. Once the old code is gone, they are really only testing the new code, so you throw them away.
- crdoconnor 11y agoIf you test at a high enough level you shouldn't have to throw the tests away while refactoring.
- Ace17 11y agoYou need throwable characterization tests when you don't know what the legacy code is supposed to do, but don't want to change its behaviour.
- crdoconnor 11y agoWhy should those characterizing tests be throwable if you don't want to change its behavior?
- grayclhn 11y agoBecause you may want or need to change aspects of the behavior, but not while refactoring.