Permalink
Browse files

Merge pull request #15085 from zuhao/refactor_actionmailer_log_subscr…

…iber_test

A minor stylistic fix and cleanup of mail deliveries.
  • Loading branch information...
2 parents 84908bb + 275d20c commit 55b1f21ae361b585e3ff0e991703a47ab4887dd0 @senny senny committed May 13, 2014
Showing with 5 additions and 3 deletions.
  1. +5 −3 actionmailer/test/log_subscriber_test.rb
@@ -1,7 +1,7 @@
-require "abstract_unit"
+require 'abstract_unit'
require 'mailers/base_mailer'
-require "active_support/log_subscriber/test_helper"
-require "action_mailer/log_subscriber"
+require 'active_support/log_subscriber/test_helper'
+require 'action_mailer/log_subscriber'
class AMLogSubscriberTest < ActionMailer::TestCase
include ActiveSupport::LogSubscriber::TestHelper
@@ -31,6 +31,8 @@ def test_deliver_is_notified
assert_equal(2, @logger.logged(:debug).size)
assert_match(/BaseMailer#welcome: processed outbound mail in [\d.]+ms/, @logger.logged(:debug).first)
assert_match(/Welcome/, @logger.logged(:debug).second)
+ ensure
+ BaseMailer.deliveries.clear
end
def test_receive_is_notified

0 comments on commit 55b1f21

Please sign in to comment.