search for: must_includ

Displaying 1 result from an estimated 1 matches for "must_includ".

Did you mean: must_include
2012 Mar 13
4
minitest validations - is there a cleaner way?
..."rejects a bad password in validation" do user = Factory.build(:user, :password_confirmation => ''Not my password'') failed_val = lambda { user.save! } failed_val.must_raise ActiveRecord::RecordInvalid error = failed_val.call rescue $! error.message.must_include "Password doesn''t match confirmation" end end --------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/...