How do I display the validation which failed in my Rails unit test?
Posted
by JD
on Stack Overflow
See other posts from Stack Overflow
or by JD
Published on 2010-04-07T01:16:27Z
Indexed on
2010/04/07
1:23 UTC
Read the original article
Hit count: 354
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 :)
© Stack Overflow or respective owner