Tuesday, August 28, 2007

rails testing




Rails Testing - Not just for the paranoid. A good article about writing your tests for Rails first, and then devleoping the code second.

For this latest Ruby on Rails project that I'm doing, I'm trying to do TDD, or rather, BDD, since I'm using specifications and not tests.

However, I found that for the first rough sketch of the application, I needed to just sketch things out with my Models and Views first, just to kind of get an idea of where I was going.

Now, for the second round of features, with GroceryItems and Suppliers, I'm doing BDD, and it's really interesting, it makes you think in a whole different way.

Still, it's hard to make that leap back to the browser, you get writing all those tests and it's hard to remember where exactly you were going, so now I'm going to start writing some more views, but trying to do these views with BDD. Wish me luck.