I got an class that extends Mailer and would like to have automatic tests for that.
With mock mailer I can get the mail to console but how to test mail logic from the automated test?
(Is there something like Mailer testing with Rails?)
br, Touko
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While writing this question, I found this link : Testing mail sending by using Mock Mailer.
So, one can access mails mailed with Mock mailer with play.libs.Mail.Mock as follows:
The mail is returned as one string but that’s better than nothing.
Though to share this since it took me a while to find this.