support multi-run test for test/did_you_mean/spell_checking/test_class_name_check.rb
This commit is contained in:
parent
59a40feec2
commit
b76a21aa45
Notes:
git
2020-02-07 23:31:14 +09:00
@ -1,4 +1,4 @@
|
||||
class Book
|
||||
class Cover
|
||||
class Spine
|
||||
end
|
||||
end
|
||||
|
@ -66,7 +66,9 @@ class ClassNameCheckTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_does_not_suggest_user_input
|
||||
error = assert_raise(NameError) { ::Book::Cover }
|
||||
Book.send(:remove_const, :Spine) if Book.constants.include?(:Spine)
|
||||
|
||||
error = assert_raise(NameError) { ::Book::Spine }
|
||||
|
||||
# This is a weird require, but in a multi-threaded condition, a constant may
|
||||
# be loaded between when a NameError occurred and when the spell checker
|
||||
|
Loading…
x
Reference in New Issue
Block a user