Skip to content

Commit

Permalink
Fix test cases for * and ** arguments in Rails/SaveBang
Browse files Browse the repository at this point in the history
  • Loading branch information
masato-bkn committed Sep 22, 2024
1 parent 122cde0 commit 1a2c974
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 1a2c974

Please sign in to comment.