Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clear deliveries in order not to affect other tests

  • Loading branch information...
commit 0df2a83b7f3989aa987e55ac85fd2e189220fd57 1 parent d49a79f
@amatsuda amatsuda authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 actionmailer/test/message_delivery_test.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.