aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorYoshiyuki Hirano <yhirano@me.com>2019-02-17 17:11:53 +0900
committerYoshiyuki Hirano <yhirano@me.com>2019-02-17 17:12:22 +0900
commited3f3159072a36709e5de5d9693baf3387258ab5 (patch)
treeae2f11e4322372ca510cfae9d861782668ab978a /actionmailer
parentfdc05952bd667e37dc0c1326c645a3dd65d450db (diff)
downloadrails-ed3f3159072a36709e5de5d9693baf3387258ab5.tar.gz
rails-ed3f3159072a36709e5de5d9693baf3387258ab5.tar.bz2
rails-ed3f3159072a36709e5de5d9693baf3387258ab5.zip
Auto correct rubocop offenses
Offenses: railties/lib/rails/autoloaders.rb:1:1: C: [Corrected] Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. module Rails ^ actionmailer/test/base_test.rb:917:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. actionmailer/test/base_test.rb:917:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected. actionmailer/test/base_test.rb:917:5: C: [Corrected] Style/RedundantBegin: Redundant begin block detected. begin ^^^^^ actionmailer/test/base_test.rb:918:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation. events = [] ^^^^ actionmailer/test/base_test.rb:930:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. actionmailer/test/base_test.rb:930:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/test/base_test.rb22
1 files changed, 10 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