diff --git a/spec/rubocop/cop/performance/redundant_equality_comparison_block_spec.rb b/spec/rubocop/cop/performance/redundant_equality_comparison_block_spec.rb index ef62797e0..ccf0adb21 100644 --- a/spec/rubocop/cop/performance/redundant_equality_comparison_block_spec.rb +++ b/spec/rubocop/cop/performance/redundant_equality_comparison_block_spec.rb @@ -49,7 +49,7 @@ it "does not register an offense when using `#{method_name}` with `===` comparison block and" \ 'block argument is not used as a receiver for `===`' do - expect_no_offenses(<<~RUBY, method_name: method_name) + expect_no_offenses(<<~RUBY) items.#{method_name} { |item| item === pattern } RUBY end diff --git a/spec/rubocop/cop/performance/sum_spec.rb b/spec/rubocop/cop/performance/sum_spec.rb index bc6549e56..d0d7428cb 100644 --- a/spec/rubocop/cop/performance/sum_spec.rb +++ b/spec/rubocop/cop/performance/sum_spec.rb @@ -326,7 +326,7 @@ end it 'does not register an offense when the array is empty' do - expect_no_offenses(<<~RUBY, method: method) + expect_no_offenses(<<~RUBY) [].#{method}(:+) RUBY end @@ -345,7 +345,7 @@ context 'when Ruby 2.3 or lower', :ruby23 do it "does not register an offense when using `array.#{method}(10, :+)`" do - expect_no_offenses(<<~RUBY, method: method) + expect_no_offenses(<<~RUBY) array.#{method}(10, :+) RUBY end diff --git a/spec/rubocop/cop/performance/times_map_spec.rb b/spec/rubocop/cop/performance/times_map_spec.rb index 9d393fcf4..a70fd62ec 100644 --- a/spec/rubocop/cop/performance/times_map_spec.rb +++ b/spec/rubocop/cop/performance/times_map_spec.rb @@ -49,7 +49,7 @@ context 'with a block with safe navigation call for nil literal' do it 'does not register an offense' do - expect_no_offenses(<<~RUBY, method: method) + expect_no_offenses(<<~RUBY) nil&.times&.#{method} { |i| i.to_s } RUBY end @@ -57,7 +57,7 @@ context 'with a block with safe navigation call for local variable' do it 'does not register an offense' do - expect_no_offenses(<<~RUBY, method: method) + expect_no_offenses(<<~RUBY) nullable&.times&.#{method} { |i| i.to_s } RUBY end @@ -65,7 +65,7 @@ context 'with a block with safe navigation call for instance variable' do it 'does not register an offense' do - expect_no_offenses(<<~RUBY, method: method) + expect_no_offenses(<<~RUBY) @nullable&.times&.#{method} { |i| i.to_s } RUBY end