Approval Testing
Characterization Tests: Safely Refactoring Legacy Code with Golden Masters
There's a specific kind of paralysis that comes with legacy code. You can see the code needs to be refactored — it's a tangle of side effects, global state, and functions that do six things at once. But you can't refactor safely without tests, and