Skip to content
Browse files

Restore test deliveries for ActionMailer.

  • Loading branch information...
1 parent ecd4151 commit 64edb6cb19863ab78ecea88cf15ed5fd19046ab6 @zuhao zuhao committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 actionpack/test/controller/assert_select_test.rb
View
5 actionpack/test/controller/assert_select_test.rb
@@ -56,13 +56,16 @@ def xml()
def setup
super
+ @old_delivery_method = ActionMailer::Base.delivery_method
+ @old_perform_deliveries = ActionMailer::Base.perform_deliveries
ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
end
def teardown
super
+ ActionMailer::Base.delivery_method = @old_delivery_method
+ ActionMailer::Base.perform_deliveries = @old_perform_deliveries
ActionMailer::Base.deliveries.clear
end

0 comments on commit 64edb6c

Please sign in to comment.
Something went wrong with that request. Please try again.