summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index a02f70f6b..2b80c851e 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -164,20 +164,24 @@ class ActiveSupport::TestCase
def assert_mail_body_match(expected, mail)
if expected.is_a?(String)
- assert_include expected, mail.body
+ assert_include expected, mail_body(mail)
else
- assert_match expected, mail.body
+ assert_match expected, mail_body(mail)
end
end
def assert_mail_body_no_match(expected, mail)
if expected.is_a?(String)
- assert_not_include expected, mail.body
+ assert_not_include expected, mail_body(mail)
else
- assert_no_match expected, mail.body
+ assert_no_match expected, mail_body(mail)
end
end
+ def mail_body(mail)
+ mail.body
+ end
+
# Shoulda macros
def self.should_render_404
should_respond_with :not_found