search for: the_actual_error

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

2006 Dec 29
3
Functional test a "create" action when a validation fails
...orresponding model I have a "validates_uniqueness_of :location". In the test case I am constructing I have the create fail with the error "Location has already been taken". Is there a way I can write an assertion like: assert_equal "Location has already been taken", [the_actual_error]. I can''t figure out how to retrieve the validation errors. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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-t...