From 8f0c5e00ff61cc2f61acedfb35de756bd0e95437 Mon Sep 17 00:00:00 2001 From: Daniel Schierbeck Date: Wed, 16 Oct 2013 10:32:06 +0200 Subject: Instrument the generation of Action Mailer messages The processing of outbound mail is instrumented with the key `process.action_mailer`. The payload includes the mailer name as well as the mailer method. --- actionmailer/test/log_subscriber_test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'actionmailer/test/log_subscriber_test.rb') diff --git a/actionmailer/test/log_subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb index 5f52a1bd69..5f0bee88fd 100644 --- a/actionmailer/test/log_subscriber_test.rb +++ b/actionmailer/test/log_subscriber_test.rb @@ -24,10 +24,13 @@ class AMLogSubscriberTest < ActionMailer::TestCase def test_deliver_is_notified BaseMailer.welcome.deliver wait + assert_equal(1, @logger.logged(:info).size) assert_match(/Sent mail to system@test.lindsaar.net/, @logger.logged(:info).first) - assert_equal(1, @logger.logged(:debug).size) - assert_match(/Welcome/, @logger.logged(:debug).first) + + 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) end def test_receive_is_notified @@ -39,4 +42,4 @@ class AMLogSubscriberTest < ActionMailer::TestCase assert_equal(1, @logger.logged(:debug).size) assert_match(/Jamis/, @logger.logged(:debug).first) end -end \ No newline at end of file +end -- cgit v1.2.3