From 2a6bc1263e99060897b53a8c806916d198eab572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 13 Jan 2010 11:56:11 +0100 Subject: Add subscriber to ActionMailer. --- actionmailer/test/mail_service_test.rb | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'actionmailer/test/mail_service_test.rb') diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 9b3da299ba..cd41739f1a 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -688,40 +688,6 @@ class ActionMailerTest < Test::Unit::TestCase TestMailer.deliver_signed_up(@recipient) end - class FakeLogger - attr_reader :info_contents, :debug_contents - - def initialize - @info_contents, @debug_contents = "", "" - end - - def info(str = nil, &blk) - @info_contents << str if str - @info_contents << blk.call if block_given? - end - - def debug(str = nil, &blk) - @debug_contents << str if str - @debug_contents << blk.call if block_given? - end - end - - def test_delivery_logs_sent_mail - mail = TestMailer.create_signed_up(@recipient) - # logger = mock() - # logger.expects(:info).with("Sent mail to #{@recipient}") - # logger.expects(:debug).with("\n#{mail.encoded}") - TestMailer.logger = FakeLogger.new - TestMailer.deliver_signed_up(@recipient) - assert(TestMailer.logger.info_contents =~ /Sent mail to #{@recipient}/) - expected = TestMailer.logger.debug_contents - actual = "\n#{mail.encoded}" - expected.gsub!(/Message-ID:.*\r\n/, "Message-ID: <123@456>\r\n") - actual.gsub!(/Message-ID:.*\r\n/, "Message-ID: <123@456>\r\n") - - assert_equal(expected, actual) - end - def test_unquote_quoted_printable_subject msg = <