diff options
Diffstat (limited to 'test/did_you_mean/spell_checking/test_class_name_check.rb')
-rw-r--r-- | test/did_you_mean/spell_checking/test_class_name_check.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/did_you_mean/spell_checking/test_class_name_check.rb b/test/did_you_mean/spell_checking/test_class_name_check.rb index ffe7a4c31b..1b863ee27c 100644 --- a/test/did_you_mean/spell_checking/test_class_name_check.rb +++ b/test/did_you_mean/spell_checking/test_class_name_check.rb @@ -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 |