Wednesday, March 21, 2007

functional tests

The first time I played with rails (two years ago), I was super sloppy about writing unit tests for my models - I wasn't working on a very complex product.

This time, I've been very diligent about writing unit tests - and it has definitely paid off.

Since my application structure is still in flux, though, I haven't written a single functional test. SO far, so good. But now it's getting to the point where things are just starting to blow up a little at a time. Which goes to show that any shortcuts you take in life will come bite you in the ass sooner or later.

So now I need to temporarily stop working on refining the product and go back and get myself up to speed on how to write functional tests, and start writing tests for all of the stuff I've done so far. Once I get over the initial inertia, adding new tests, and refactoring them as the application changes should be actually quite easy.

Better now than after I have customers, I suppose :)

No comments: