File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -969,6 +969,27 @@ def test_find_store
969
969
assert_equal 'nonexistent' , e . name
970
970
end
971
971
972
+ def test_did_you_mean
973
+ skip 'skip test with did_you_men' unless defined? DidYouMean ::SpellChecker
974
+
975
+ util_ancestors_store
976
+
977
+ e = assert_raises RDoc ::RI ::Driver ::NotFoundError do
978
+ @driver . lookup_method 'Foo.i_methdo'
979
+ end
980
+ assert_equal "Nothing known about Foo.i_methdo\n Did you mean? i_method" , e . message
981
+
982
+ e = assert_raises RDoc ::RI ::Driver ::NotFoundError do
983
+ @driver . lookup_method 'Foo#i_methdo'
984
+ end
985
+ assert_equal "Nothing known about Foo#i_methdo\n Did you mean? i_method" , e . message
986
+
987
+ e = assert_raises RDoc ::RI ::Driver ::NotFoundError do
988
+ @driver . lookup_method 'Foo::i_methdo'
989
+ end
990
+ assert_equal "Nothing known about Foo::i_methdo\n Did you mean? c_method" , e . message
991
+ end
992
+
972
993
def test_formatter
973
994
tty = Object . new
974
995
def tty . tty? ( ) true ; end
You can’t perform that action at this time.
0 commit comments