[ruby/error_highlight] Make test_COLON2_5 conditional again
https://github.com/ruby/error_highlight/commit/da5e76bb06
This commit is contained in:
parent
371055979f
commit
bb1ef81732
@ -869,13 +869,27 @@ uninitialized constant ErrorHighlightTest::NotDefined
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_COLON2_5
|
if ErrorHighlight.const_get(:Spotter).const_get(:OPT_GETCONSTANT_PATH)
|
||||||
# Unfortunately, we cannot identify which `NotDefined` caused the NameError
|
def test_COLON2_5
|
||||||
assert_error_message(NameError, <<~END) do
|
# Unfortunately, we cannot identify which `NotDefined` caused the NameError
|
||||||
uninitialized constant ErrorHighlightTest::NotDefined
|
assert_error_message(NameError, <<~END) do
|
||||||
END
|
uninitialized constant ErrorHighlightTest::NotDefined
|
||||||
|
END
|
||||||
|
|
||||||
ErrorHighlightTest::NotDefined::NotDefined
|
ErrorHighlightTest::NotDefined::NotDefined
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
def test_COLON2_5
|
||||||
|
assert_error_message(NameError, <<~END) do
|
||||||
|
uninitialized constant ErrorHighlightTest::NotDefined
|
||||||
|
|
||||||
|
ErrorHighlightTest::NotDefined::NotDefined
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
END
|
||||||
|
|
||||||
|
ErrorHighlightTest::NotDefined::NotDefined
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user