Skip to content

Commit

Permalink
Merge pull request #1369 from masato-bkn/fix-rails-save-bang-test
Browse files Browse the repository at this point in the history
Fix test cases for `*` and `**` arguments in `Rails/SaveBang`
  • Loading branch information
koic authored Sep 23, 2024
2 parents 122cde0 + 1a2c974 commit 1b7292e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/rubocop/cop/rails/save_bang_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
RUBY
else
expect_offense(<<~RUBY, method: method)
object.#{method}(variable)
object.#{method}(*variable)
^{method} Use `#{method}!` instead of `#{method}` if the return value is not checked.
RUBY

expect_correction(<<~RUBY)
object.#{method}!(variable)
object.#{method}!(*variable)
RUBY
end
end
Expand All @@ -64,12 +64,12 @@
RUBY
else
expect_offense(<<~RUBY, method: method)
object.#{method}(variable)
object.#{method}(**variable)
^{method} Use `#{method}!` instead of `#{method}` if the return value is not checked.
RUBY

expect_correction(<<~RUBY)
object.#{method}!(variable)
object.#{method}!(**variable)
RUBY
end
end
Expand Down

0 comments on commit 1b7292e

Please sign in to comment.