Skip to content

Commit

Permalink
Remove redundant expect_no_offenses keyword arguments
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
koic committed Feb 14, 2024
1 parent 8293b58 commit ada5c28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/rubocop/cop/rails/save_bang_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ada5c28

Please sign in to comment.