Methods
Public Instance methods
[ show source ]
# File test/mail_helper_test.rb, line 62
62: def new_mail( charset="utf-8" )
63: mail = TMail::Mail.new
64: mail.set_content_type "text", "plain", { "charset" => charset } if charset
65: mail
66: end
[ show source ]
# File test/mail_helper_test.rb, line 68
68: def setup
69: ActionMailer::Base.delivery_method = :test
70: ActionMailer::Base.perform_deliveries = true
71: ActionMailer::Base.deliveries = []
72:
73: @recipient = 'test@localhost'
74: end
[ show source ]
# File test/mail_helper_test.rb, line 76
76: def test_use_helper
77: mail = HelperMailer.create_use_helper(@recipient)
78: assert_match %r{Mr. Joe Person}, mail.encoded
79: end
[ show source ]
# File test/mail_helper_test.rb, line 86
86: def test_use_helper_method
87: mail = HelperMailer.create_use_helper_method(@recipient)
88: assert_match %r{HelperMailer}, mail.encoded
89: end
[ show source ]
# File test/mail_helper_test.rb, line 91
91: def test_use_mail_helper
92: mail = HelperMailer.create_use_mail_helper(@recipient)
93: assert_match %r{ But soft!}, mail.encoded
94: assert_match %r{east, and\n Juliet}, mail.encoded
95: end
[ show source ]
# File test/mail_helper_test.rb, line 81
81: def test_use_test_helper
82: mail = HelperMailer.create_use_test_helper(@recipient)
83: assert_match %r{<em><strong><small>emphasize me!}, mail.encoded
84: end