[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PhillyOnRails] rspec slides
|
- From: "Evan Weaver" <evan@cloudbur.st>
- To: talk@phillyonrails.org
- Subject: Re: [PhillyOnRails] rspec slides
- Date: Thu, 13 Sep 2007 18:40:12 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=Z6DZqc3ehupct3cMrNirggRkGpeYq5s0m2ouy8fzXlQ=; b=tRYSH6qXh5chcGUCWC6Bt1EYEGCXTnzWwsXjJaD0isbfj4gy8luOtv7nrFp5n1CAN0oD7MbC3klt60Fd2HmSVhc5nPmfrAXlans2lK/J72N87v7cIU4uC5XpqiBD9+zn3oR38zOt1+VF9+6SPdHCjTc316w5Pm1keSuiz3WGKX0=
- List-archive: <http://lists.phillyonrails.org/pipermail/talk>
- Reply-to: talk@phillyonrails.org
- Sender: talk-bounces@phillyonrails.org
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
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk
|
|