Return to Snippet

Revision: 1368
at September 29, 2006 01:46 by rduv


Initial Code
def setup @user = users(:myfixtureuser) ActionMailer::Base.deliveries = [] end def test_welcome_mail MyMailer.deliver_welcome_email assert !ActionMailer::Base.deliveries.empty? sent = ActionMailer::Base.deliveries.first assert_equal [@user.email], sent.to assert_equal "expected subject", sent.subject assert sent.body =~ /^Welcome to my App/ assert sent.body =~ /^Username: #{@user.login}$/ assert sent.body =~ /^Password: [a-z0-9]{10}$/i end

Initial URL
http://theexciter.com/

Initial Description

                                

Initial Title
ActionMailer testing

Initial Tags

                                

Initial Language
Ruby