Reputation: 8034
I have one test case where i want to test the body of the email:
last_email.to.should include(user.email)
last_email.body.should match(user.email)
But the body is always empty when i run rspec:
Failure/Error: last_email.body.encoded.should match(user.email)
expected "" to match "[email protected]"
the sender/recipients/subject fields are all OKs. How can I access the body of the email (encoded in HTML)?
Upvotes: 1
Views: 1779
Reputation: 8034
My bad. The mailer view folder name was mispelled, that's why the body was empty...
Upvotes: 2