summaryrefslogtreecommitdiff
path: root/test/did_you_mean/core_ext/test_name_error_extension.rb
diff options
context:
space:
mode:
authorYuki Nishijima <yk.nishijima@gmail.com>2021-12-23 10:08:07 +0900
committerYuki Nishijima <yk.nishijima@gmail.com>2021-12-23 10:09:10 +0900
commitde841e2e28a8f721895acb1a76c7847b40cc487a (patch)
tree26bf60748de9eb252b97ca5c7aab3927473a5c59 /test/did_you_mean/core_ext/test_name_error_extension.rb
parentc529014b9dc107c2b938f87e13941b6709fc7a76 (diff)
Revert the commits for did_you_mean
This reverts commit feaf4fbc3fa16382fbd07158c448c7b5bdae78b5. This reverts commit 0d4bfbdbe1f880c712b3e60de5fce423e6096f8d. This reverts commit ac4e0978ee4358430396403065eabe1aca05784f.
Diffstat (limited to 'test/did_you_mean/core_ext/test_name_error_extension.rb')
-rw-r--r--test/did_you_mean/core_ext/test_name_error_extension.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/did_you_mean/core_ext/test_name_error_extension.rb b/test/did_you_mean/core_ext/test_name_error_extension.rb
index 91871cda9a..9dc08dbde3 100644
--- a/test/did_you_mean/core_ext/test_name_error_extension.rb
+++ b/test/did_you_mean/core_ext/test_name_error_extension.rb
@@ -1,7 +1,7 @@
require_relative '../helper'
class NameErrorExtensionTest < Test::Unit::TestCase
- SPELL_CHECKERS = DidYouMean.spell_checkers
+ SPELL_CHECKERS = DidYouMean::SPELL_CHECKERS
class TestSpellChecker
def initialize(*); end
@@ -9,14 +9,13 @@ class NameErrorExtensionTest < Test::Unit::TestCase
end
def setup
- @original_spell_checker = DidYouMean.spell_checkers['NameError']
- DidYouMean.correct_error(NameError, TestSpellChecker)
+ @org, SPELL_CHECKERS['NameError'] = SPELL_CHECKERS['NameError'], TestSpellChecker
@error = assert_raise(NameError){ doesnt_exist }
end
def teardown
- DidYouMean.correct_error(NameError, @original_spell_checker)
+ SPELL_CHECKERS['NameError'] = @org
end
def test_message