Evan Weaver on 14 Sep 2007 01:12:58 -0000 |
I see now that the validates_ line is from the model, and that you are advocating not writing this kind of test. :) Anyway. Jay's post is still good. Evan On 9/13/07, Evan Weaver <evan@cloudbur.st> wrote: > On 9/13/07, Cassius Rosenthal <cassius@xmodulation.com> wrote: > > > user.login.length.should be_close( 8, 4 ) > > > validates_length_of :login, :within => 4..12 > > Do you really write tests like this? I think Jay Levitt's post is > applicable: http://rubyforge.org/pipermail/rspec-users/2007-September/002973.html > > My tests are always micro workflows (in Test::Unit or test/spec) > rather than perfectly coupled unit tests. In both of these examples > you are basically testing whether 8 + 4 = 12. Why not test some actual > usernames of various edge lengths, instead? > > Evan > > -- > Evan Weaver > Cloudburst, LLC > -- Evan Weaver Cloudburst, LLC _______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk
|
|