3 ms·
> you should write tests for things you want to make sure they will not break You should also write tests for things that are already broken before you work on
by gav 8y ago
> you should write tests for things you want to make sure they will not break
You should also write tests for things that are already broken before you work on the fix so that you can be sure it's actually fixed. Basically the red/green/refactor cycle[1] from TDD.
[1] http://www.brendanconnolly.net/test-driven-testing-red-green-refactor/ http://www.brendanconnolly.net/test-driven-testing-red-green...