News for hackers. Stuff that matters.
Re:Test driven development at Transloadit by felixge on Thursday October 28, 2010 @11:36AM (#1843288)
You can get value out of writing a test after the fact. But the value is higher for a test that you have written before the code because you have seen the test go from failing to passing. This way you know it will also fail if you break the code in the future.

I also think writing the test before the feature will cause you to write better assert statements. If you write the test afterwards you'll tend to either assert everything (which leads to every test breaking on a small change), or to be horribly confused about what to assert and what not.

There are no comments on this comment yet.