Skip to content

Commit

Permalink
Make test_COLON2_5 conditional again
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Jul 12, 2024
1 parent 1fac7b8 commit da5e76b
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions test/test_error_highlight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -869,13 +869,27 @@ def test_COLON2_4
end
end

def test_COLON2_5
# Unfortunately, we cannot identify which `NotDefined` caused the NameError
assert_error_message(NameError, <<~END) do
if ErrorHighlight.const_get(:Spotter).const_get(:OPT_GETCONSTANT_PATH)
def test_COLON2_5
# Unfortunately, we cannot identify which `NotDefined` caused the NameError
assert_error_message(NameError, <<~END) do
uninitialized constant ErrorHighlightTest::NotDefined
END

ErrorHighlightTest::NotDefined::NotDefined
end
end
else
def test_COLON2_5
assert_error_message(NameError, <<~END) do
uninitialized constant ErrorHighlightTest::NotDefined
END
ErrorHighlightTest::NotDefined::NotDefined
ErrorHighlightTest::NotDefined::NotDefined
^^^^^^^^^^^^
END

ErrorHighlightTest::NotDefined::NotDefined
end
end
end

Expand Down

0 comments on commit da5e76b

Please sign in to comment.