One of the models in a project I am working on right now ends in ’status’. Rails handles that just find but in my tests I started noticing an odd error:
test: Lookup should belong_to lookup_status. (LookupTest):
NameError: uninitialized constant LookupStatu
The Shoulda test looks like this:
should_belong_to :lookup_status
Nothing to complicated there. Should recognizes [...]
Tags: bugs · Ruby On Rails · shoulda
I have been banging my head against a problem in my testing. Using the UI everything worked as expected, but my tests were failing when I tried to see if emails were being sent in a specific case.
Here’s the test I was trying to run using Shoulda:
context “reset password for user that has not [...]
Tags: assert_sent_email · Ruby On Rails · shoulda
Shoulda comes with a great method for testing email called ‘assert_sent_email’. (If you try it and get a method missing error update Shoulda. Not that anyone wouldn’t know to just do that). No matter what you use to test email as long as you are in test mode your emails will be [...]
Tags: assert_sent_email · email · Ruby On Rails · shoulda