aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionmailer/test/base_test.rb22
-rw-r--r--railties/lib/rails/autoloaders.rb2
2 files changed, 12 insertions, 12 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb
index 15613d4dce..531bf58ea9 100644
--- a/actionmailer/test/base_test.rb
+++ b/actionmailer/test/base_test.rb
@@ -914,20 +914,18 @@ class BaseTest < ActiveSupport::TestCase
end
test "notification for deliver" do
- begin
- events = []
- ActiveSupport::Notifications.subscribe("deliver.action_mailer") do |*args|
- events << ActiveSupport::Notifications::Event.new(*args)
- end
+ events = []
+ ActiveSupport::Notifications.subscribe("deliver.action_mailer") do |*args|
+ events << ActiveSupport::Notifications::Event.new(*args)
+ end
- BaseMailer.welcome(body: "Hello there").deliver_now
+ BaseMailer.welcome(body: "Hello there").deliver_now
- assert_equal 1, events.length
- assert_equal "deliver.action_mailer", events[0].name
- assert_not_nil events[0].payload[:message_id]
- ensure
- ActiveSupport::Notifications.unsubscribe "deliver.action_mailer"
- end
+ assert_equal 1, events.length
+ assert_equal "deliver.action_mailer", events[0].name
+ assert_not_nil events[0].payload[:message_id]
+ ensure
+ ActiveSupport::Notifications.unsubscribe "deliver.action_mailer"
end
private
diff --git a/railties/lib/rails/autoloaders.rb b/railties/lib/rails/autoloaders.rb
index 4b71f90c6b..b03499cf81 100644
--- a/railties/lib/rails/autoloaders.rb
+++ b/railties/lib/rails/autoloaders.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Rails
module Autoloaders # :nodoc:
class << self