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