diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index a8ab19a95c0e3..e49eabdce8275 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -121,4 +121,16 @@ def test_use_cache assert_equal "Greetings from a cache helper block", mail.body.encoded end end + + def helper + Object.new.extend(ActionMailer::MailHelper) + end + + def test_block_format + assert_equal " * foo\n", helper.block_format(" * foo") + assert_equal " * foo\n", helper.block_format(" * foo") + assert_equal " * foo\n", helper.block_format("* foo") + assert_equal " * foo\n*bar", helper.block_format("* foo*bar") + assert_equal " * foo\n * bar\n", helper.block_format("* foo * bar") + end end