Permalink
Browse files

Clear deliveries in order not to affect other tests

  • Loading branch information...
amatsuda committed Aug 20, 2014
1 parent d49a79f commit 0df2a83b7f3989aa987e55ac85fd2e189220fd57
Showing with 4 additions and 2 deletions.
  1. +4 −2 actionmailer/test/message_delivery_test.rb
@@ -45,9 +45,11 @@ class MessageDeliveryTest < ActiveSupport::TestCase
assert_respond_to @mail, :deliver_later!
end
- test 'should enqueue and run correctly in activejob' do
+ def test_should_enqueue_and_run_correctly_in_activejob
@mail.deliver_later!
- assert_equal 1 , ActionMailer::Base.deliveries.size
+ assert_equal 1, ActionMailer::Base.deliveries.size
+ ensure
+ ActionMailer::Base.deliveries.clear
end
test 'should enqueue the email with :deliver delivery method' do

0 comments on commit 0df2a83

Please sign in to comment.