RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Verifying Email Templates In ActionMailer Functional Tests

assert_template is great for Rails functional tests, but there’s no equivalent for ActionMailer templates. This forces us to fall back on running a regex on the email body to make sure the right content was generated, and that can be a little fragile if the copy gets updated. In this short post, I code up a simple ActionMailer equivalent for assert_template.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in