Namespace
Methods
S
T
Included Modules
Instance Public methods
set_logger(logger)
# File actionmailer/test/log_subscriber_test.rb, line 20
def set_logger(logger)
  ActionMailer::Base.logger = logger
end
setup()
# File actionmailer/test/log_subscriber_test.rb, line 9
def setup
  super
  ActionMailer::LogSubscriber.attach_to :action_mailer
end
test_deliver_is_notified()
# File actionmailer/test/log_subscriber_test.rb, line 24
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)
end
test_receive_is_notified()
# File actionmailer/test/log_subscriber_test.rb, line 33
def test_receive_is_notified
  fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email")
  TestMailer.receive(fixture)
  wait
  assert_equal(1, @logger.logged(:info).size)
  assert_match(/Received mail/, @logger.logged(:info).first)
  assert_equal(1, @logger.logged(:debug).size)
  assert_match(/Jamis/, @logger.logged(:debug).first)
end