From ada5c2885436467d3a163424d7b8f6e740fe9479 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Wed, 14 Feb 2024 10:24:22 +0900 Subject: [PATCH] Remove redundant `expect_no_offenses` keyword arguments This commit removes the following redundant `expect_no_offenses` keyword arguments: ```console $ bundle exec rubocop (snip) Offenses: spec/rubocop/cop/rails/save_bang_spec.rb:175:35: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method: method) ^^^^^^^^^^^^^^^^ spec/rubocop/cop/rails/save_bang_spec.rb:291:33: C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments. expect_no_offenses(<<~RUBY, method: method) ^^^^^^^^^^^^^^^^ 292 files inspected, 2 offenses detected, 2 offenses autocorrectable ``` --- spec/rubocop/cop/rails/save_bang_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/rubocop/cop/rails/save_bang_spec.rb b/spec/rubocop/cop/rails/save_bang_spec.rb index ce3a4a25eb..a74704889d 100644 --- a/spec/rubocop/cop/rails/save_bang_spec.rb +++ b/spec/rubocop/cop/rails/save_bang_spec.rb @@ -172,7 +172,7 @@ it "when using #{method} wrapped within parenthesis with if" do if update - expect_no_offenses(<<~RUBY, method: method) + expect_no_offenses(<<~RUBY) if (object.#{method}); something; end RUBY else @@ -288,7 +288,7 @@ end it "when using #{method} with a bunch of hashes & arrays" do - expect_no_offenses(<<~RUBY, method: method) + expect_no_offenses(<<~RUBY) return [{ success: object.#{method} }, true] RUBY end