bornboulder77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2009-Mar-23 22:40 UTC
Spec::Rails, "model.should have(1).error_on(:attribute)" passes when?
Spec::Rails people, I''m curious about: - model.should have(1).error_on(:attribute) displayed in the URL below: http://rspec.rubyforge.org/rspec-rails/1.2.2/classes/Spec/Rails/Exten... The Rspec peepcode screencast suggests that model.should have(1).error_on(:attribute) should pass if model.send(:attribute) returns nil For me, I get an exception from the rspec script. My work-around is simple. Instead of: - model.should have(1).error_on(:attribute) I Use: -model.send(:attribute).should be_nil But now I have the question: - What kind of error causes: - model.should have(1).error_on(:attribute) - to pass ?? --b --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---