drewB wrote: > I am attempting to use Test Driven Development for the first time and > was hoping for a little advice.
Great! Give serious consideration to rSpec, if you haven't already, and completely avoid Rails' fixtures (use Machinist or similar instead). > I am just starting a new section of > the website that will ultimately contain a couple controllers and > about 6 models. You haven't written tests yet. You don't really know how many of either it will contain. Don't do this level of design before writing tests. > If I am going to write my tests before any code, I > need to decide whether to start writing test with the models or the > controllers. Do I write the test for the models and in the course of > writing the code that will make them succeed build the models or > should I start with the models, get them all working and then move on > to the controllers? My guess is you can do it either way but I > thought perhaps some folks who have worked in TDD environments might > have some wisdom to share. You certainly can do it either way. I think in most cases, I would try to start by writing Cucumber features to establish how the application should present itself to the user, then write whatever classes (and unit tests) prove necessary to implement those features. > > Thanks! Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

