Permalink
Browse files

Reduce specificity of logging test to avoid dependency on the system …

…clock

Signed-off-by: Yehuda Katz <wycats@gmail.com>
  • Loading branch information...
1 parent 1901747 commit 1d7412b135cac39a6693cc1efa328e6c7707698d @brynary brynary committed with wycats Sep 30, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionmailer/test/mail_service_test.rb
@@ -570,7 +570,9 @@ 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}")
+ logger.expects(:debug).with() do |logged_text|
+ logged_text =~ /\[Signed up\] Welcome/
+ end
TestMailer.logger = logger
TestMailer.deliver_signed_up(@recipient)
end

0 comments on commit 1d7412b

Please sign in to comment.