How do I display the validation which failed in my Rails unit test?
- by JD
Summary: Failed unit tests tell me which assert (file:line) failed, but not which validation resulted in the failure.
More info: I have 11 validations in one of my models. Unit testing is great, whether I run `rake test:units --trace' or 'ruby -Itest test/unit/mymodel_test.rb'. However, despite the fact that it tells me exactly which assert() failed me, I am not told which validation failed. I must be missing something obvious, because I can't ask Google this question well enough to get an answer.
Thanks :)