Colin A. Bartlett on 13 Sep 2007 20:00:52 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] rspec slides


Randy Schmidt wrote:
Just as it is frowned upon to rspec
whether ActiveRecord can save a record, I think it's equally pointless
to rspec whether validates_length_of can return an error.
    

I'm just an observer in this conversation
Now you're not.
, but I think it is pointless
to test that it can throw an error but I don't think it's pointless to
test whether or not that validation is in your code. 
Here is why calling them "specs" starts to make sense to me.

We're not testing that validations work, we're specifying that our app should require a first and last name.

-- 
Colin A. Bartlett
Kinetic Web Solutions
http://blog.kineticweb.com
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk