ruby-changes:66622
From: Yusuke <ko1@a...>
Date: Tue, 29 Jun 2021 17:28:07 +0900 (JST)
Subject: [ruby-changes:66622] 39f99b8176 (master): Use assert_not_match "Did you mean?" for UncorrectableNameCheckTest
https://git.ruby-lang.org/ruby.git/commit/?id=39f99b8176 From 39f99b8176ddec14058919ae8a317ea0c5216812 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Fri, 18 Jun 2021 17:54:02 +0900 Subject: Use assert_not_match "Did you mean?" for UncorrectableNameCheckTest ... instead of exact matching. I'm now creating a built-in gem that modifies Exception's error message, so the expectation value is changed. IMO, it is good to check that did_you_mean suggestion is NOT added in the uncorrectable case. https://github.com/ruby/did_you_mean/commit/ebe88ec4d2 --- test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb b/test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb index 5d934e5..2fa65bb 100644 --- a/test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb +++ b/test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb @@ -10,6 +10,6 @@ class UncorrectableNameCheckTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb#L10 end def test_message - assert_equal "Other name error", @error.message + assert_not_match /Did you mean\?/, @error.message end end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/