From: James Gray Date: 2008-08-04T05:01:09+09:00 Subject: Re: unit testing advice On Aug 3, 2008, at 12:03 PM, James Britt wrote: > And the issue is that it creates a model file before the developer > has written a failing test indicating the need for a model file. > > One might assume that the developer is going to end up in the same > place anyways, so the code might as well be automatically generated, > but it's contrary to "write the spec, have it fail, then write the > code to make the spec pass". > > I'm not arguing in favor of dogmatic testing practices, justing > pointing out that there is at least one person who actually walks > the walk. > > (Besides, when a developer selects Rails as their toolkit they've > already made many code choices long before there are any tests to > drive those decisions, so the TDD/BDD purity thing is sort of a moot > point.) Yeah, I think this is a good example of the dogma getting in the way of common sense. To use Rails and not allow it to generate files and by extension satisfy it's own conventions for you just sounds silly to me. My opinion is that the goal of testing is to add some degree of protection to the software you build, not to straight-jacket you as a programmer. James Edward Gray II