Anthony Smith wrote in post #960202: > For example: > > it 'should not validate if nil' do > @account.name = nil > @account.should_not be_valid
Those two lines are good practice: you're testing that the object is invalid when you want it to be. > @account.errors[:name][0].should eq 'can\'t be blank' That line seems unnecessary: you're testing the Rails framework, which is already well tested. > end > > Is this good practice? Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

