test/test_armailer.rb in adzap-ar_mailer-2.1.7 vs test/test_armailer.rb in adzap-ar_mailer-2.1.8
- old
+ new
@@ -7,10 +7,11 @@
@mail = Object.new
def @mail.encoded() 'email' end
def @mail.from() ['nobody@example.com'] end
def @mail.[](key) {'return-path' => $return_path, 'from' => 'nobody@example.com'}[key] end
def @mail.destinations() %w[user1@example.com user2@example.com] end
+ def @mail.ready_to_send() end
end
end
class TestARMailer < Test::Unit::TestCase
@@ -28,10 +29,10 @@
Mailer.deliver_mail
assert_equal 2, Newsletter.records.length
end
-
+
def test_perform_delivery_activerecord_when_return_path_is_present
$return_path = stub(:spec => 'return-path@example.com')
Mailer.deliver_mail
assert_equal 2, Email.records.length