Skip to content

Commit 1b7292e

Browse files
authored
Merge pull request #1369 from masato-bkn/fix-rails-save-bang-test
Fix test cases for `*` and `**` arguments in `Rails/SaveBang`
2 parents 122cde0 + 1a2c974 commit 1b7292e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/rubocop/cop/rails/save_bang_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@
4747
RUBY
4848
else
4949
expect_offense(<<~RUBY, method: method)
50-
object.#{method}(variable)
50+
object.#{method}(*variable)
5151
^{method} Use `#{method}!` instead of `#{method}` if the return value is not checked.
5252
RUBY
5353

5454
expect_correction(<<~RUBY)
55-
object.#{method}!(variable)
55+
object.#{method}!(*variable)
5656
RUBY
5757
end
5858
end
@@ -64,12 +64,12 @@
6464
RUBY
6565
else
6666
expect_offense(<<~RUBY, method: method)
67-
object.#{method}(variable)
67+
object.#{method}(**variable)
6868
^{method} Use `#{method}!` instead of `#{method}` if the return value is not checked.
6969
RUBY
7070

7171
expect_correction(<<~RUBY)
72-
object.#{method}!(variable)
72+
object.#{method}!(**variable)
7373
RUBY
7474
end
7575
end

0 commit comments

Comments
 (0)