> Wrong. You don't have to test validates_presence_of. What matters, > and therefore what you should test, is whether the model will complain > at you if a particular value is left empty. > ... > If your spec breaks because you changed a method call, you're not > testing behavior any more. You're testing syntax.
I totally agree with your point of view. > Also, while I used to be very anal and write "should > have(1).error_on(:login)" and such, I eventually realized that there's > no point. Checking on 'valid?' is entire and sufficient. I also came to the same conclusion. That's why I am very cautious with "rake stats" and rcov, it entices people to write dumb tests / specs just to get the figures up. -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users