Skip to content

Commit 875bdb4

Browse files
committed
Restore skipped specs for Prism
This PR restores skipped specs for Prism. They have already been resolved in Prism, so they can be tested.
1 parent eab7722 commit 875bdb4

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

spec/rubocop/cop/performance/collection_literal_in_loop_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@
144144
RUBY
145145
end
146146

147-
# FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in
148-
# the development line. This will be resolved in Prism > 0.24.0 and higher releases.
149-
it 'registers an offense when the method is called with no receiver', broken_on: :prism do
147+
it 'registers an offense when the method is called with no receiver' do
150148
expect_offense(<<~RUBY)
151149
all? do |e|
152150
[1, 2, 3].include?(e)

spec/rubocop/cop/performance/redundant_merge_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
end
3737
end
3838

39-
# FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in
40-
# the development line. This will be resolved in Prism > 0.24.0 and higher releases.
41-
context 'when receiver is implicit', broken_on: :prism do
39+
context 'when receiver is implicit' do
4240
it "doesn't autocorrect" do
4341
new_source = autocorrect_source('merge!(foo: 1, bar: 2)')
4442
expect(new_source).to eq('merge!(foo: 1, bar: 2)')

spec/rubocop/cop/performance/string_identifier_argument_spec.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
RUBY
2828
end
2929
else
30-
# FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in
31-
# the development line. This will be resolved in Prism > 0.24.0 and higher releases.
32-
it "registers an offense when using string argument for `#{method}` method", broken_on: :prism do
30+
it "registers an offense when using string argument for `#{method}` method" do
3331
expect_offense(<<~RUBY, method: method)
3432
#{method}('do_something')
3533
_{method} ^^^^^^^^^^^^^^ Use `:do_something` instead of `'do_something'`.
@@ -40,18 +38,14 @@
4038
RUBY
4139
end
4240

43-
# FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in
44-
# the development line. This will be resolved in Prism > 0.24.0 and higher releases.
45-
it "does not register an offense when using symbol argument for `#{method}` method", broken_on: :prism do
41+
it "does not register an offense when using symbol argument for `#{method}` method" do
4642
expect_no_offenses(<<~RUBY)
4743
#{method}(:do_something)
4844
RUBY
4945
end
5046

5147
if described_class::INTERPOLATION_IGNORE_METHODS.include?(method)
52-
# FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in
53-
# the development line. This will be resolved in Prism > 0.24.0 and higher releases.
54-
it 'does not register an offense when using string interpolation for `#{method}` method', broken_on: :prism do
48+
it 'does not register an offense when using string interpolation for `#{method}` method' do
5549
# NOTE: These methods don't support `::` when passing a symbol. const_get('A::B') is valid
5650
# but const_get(:'A::B') isn't. Since interpolated arguments may contain any content these
5751
# cases are not detected as an offense to prevent false positives.
@@ -60,9 +54,7 @@
6054
RUBY
6155
end
6256
else
63-
# FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in
64-
# the development line. This will be resolved in Prism > 0.24.0 and higher releases.
65-
it 'registers an offense when using interpolated string argument', broken_on: :prism do
57+
it 'registers an offense when using interpolated string argument' do
6658
expect_offense(<<~RUBY, method: method)
6759
#{method}("do_something_\#{var}")
6860
_{method} ^^^^^^^^^^^^^^^^^^^^^ Use `:"do_something_\#{var}"` instead of `"do_something_\#{var}"`.

0 commit comments

Comments
 (0)