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-22 20:29:18 +0900
committerYuki Nishijima <yk.nishijima@gmail.com>2021-12-22 20:29:18 +0900
commitac4e0978ee4358430396403065eabe1aca05784f (patch)
treed40cd51abf97cb03a4c5ed9c3da89dbc5b9e7128 /test/did_you_mean/core_ext/test_name_error_extension.rb
parentfdf39963490cf2cf95b30d91bb9b35964c2c2350 (diff)
* gems/default_gems: Sync did_you_mean
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, 4 insertions, 3 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 9dc08dbde3..91871cda9a 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,13 +9,14 @@ class NameErrorExtensionTest < Test::Unit::TestCase
end
def setup
- @org, SPELL_CHECKERS['NameError'] = SPELL_CHECKERS['NameError'], TestSpellChecker
+ @original_spell_checker = DidYouMean.spell_checkers['NameError']
+ DidYouMean.correct_error(NameError, TestSpellChecker)
@error = assert_raise(NameError){ doesnt_exist }
end
def teardown
- SPELL_CHECKERS['NameError'] = @org
+ DidYouMean.correct_error(NameError, @original_spell_checker)
end
def test_message