class MailerHelperTest
Public Instance Methods
test_use_block_format()
click to toggle source
# File actionmailer/test/mail_helper_test.rb, line 105 def test_use_block_format mail = HelperMailer.use_block_format expected = <<-TEXT This is the first paragraph. The second paragraph. * item1 * item2 * item3 TEXT assert_equal expected.gsub("\n", "\r\n"), mail.body.encoded end
test_use_cache()
click to toggle source
# File actionmailer/test/mail_helper_test.rb, line 119 def test_use_cache assert_nothing_raised do mail = HelperMailer.use_cache assert_equal "Greetings from a cache helper block", mail.body.encoded end end
test_use_format_paragraph()
click to toggle source
# File actionmailer/test/mail_helper_test.rb, line 95 def test_use_format_paragraph mail = HelperMailer.use_format_paragraph assert_match " But soft! What\r\n light through\r\n yonder window\r\n breaks?", mail.body.encoded end
test_use_format_paragraph_with_long_first_word()
click to toggle source
# File actionmailer/test/mail_helper_test.rb, line 100 def test_use_format_paragraph_with_long_first_word mail = HelperMailer.use_format_paragraph_with_long_first_word assert_equal " Antidisestablishmentarianism\r\n is very\r\n long.", mail.body.encoded end
test_use_mail_helper()
click to toggle source
# File actionmailer/test/mail_helper_test.rb, line 79 def test_use_mail_helper mail = HelperMailer.use_mail_helper assert_match %r{ But soft!}, mail.body.encoded assert_match %r{east, and\r\n Juliet}, mail.body.encoded end
test_use_mailer()
click to toggle source
# File actionmailer/test/mail_helper_test.rb, line 85 def test_use_mailer mail = HelperMailer.use_mailer assert_match "using helpers", mail.body.encoded end
test_use_message()
click to toggle source
# File actionmailer/test/mail_helper_test.rb, line 90 def test_use_message mail = HelperMailer.use_message assert_match "using helpers", mail.body.encoded end