From 8e73e589a8949c8162f81148bb497804fa641e1d Mon Sep 17 00:00:00 2001 From: Diego Carrion Date: Wed, 9 Mar 2011 16:06:48 -0300 Subject: publicise ActionMailer::MailHelper.format_paragraph [#6550 state:committed] Signed-off-by: Santiago Pastorino --- actionmailer/test/mail_helper_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actionmailer/test/mail_helper_test.rb') diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index 7cc0804323..17e9c82045 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -14,6 +14,14 @@ class HelperMailer < ActionMailer::Base end end + def use_format_paragraph + @text = "But soft! What light through yonder window breaks?" + + mail_with_defaults do |format| + format.html { render(:inline => "<%= format_paragraph @text, 15, 1 %>") } + end + end + def use_mailer mail_with_defaults do |format| format.html { render(:inline => "<%= mailer.message.subject %>") } @@ -50,5 +58,10 @@ class MailerHelperTest < ActionMailer::TestCase mail = HelperMailer.use_message assert_match "using helpers", mail.body.encoded end + + 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 end -- cgit v1.2.3