diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-10 02:01:00 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-10 02:01:00 +0000 |
commit | db6c51ec4f9d1b7386215cad5924e6e03733b6d6 (patch) | |
tree | a9c5accde00bbc0263aebb5b6d65f0922b9aef20 /test/rdoc/test_rdoc_ri_driver.rb | |
parent | 4e1fe5357e0286c738e9aaca5201765d187fbed3 (diff) |
Merge rdoc-6.0.0.beta3.
* It version introduced did you mean? feature for ri command:
https://github.com/ruby/rdoc/pull/533
* Removed obbsoleted ruby_token.rbb.
[Bug #13990][ruby-core:83180]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_ri_driver.rb')
-rw-r--r-- | test/rdoc/test_rdoc_ri_driver.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb index 1aa4762f92..81c8469e25 100644 --- a/test/rdoc/test_rdoc_ri_driver.rb +++ b/test/rdoc/test_rdoc_ri_driver.rb @@ -969,6 +969,27 @@ Foo::Bar#bother assert_equal 'nonexistent', e.name end + def test_did_you_mean + skip 'skip test with did_you_men' unless defined? DidYouMean::SpellChecker + + util_ancestors_store + + e = assert_raises RDoc::RI::Driver::NotFoundError do + @driver.lookup_method 'Foo.i_methdo' + end + assert_equal "Nothing known about Foo.i_methdo\nDid you mean? i_method", e.message + + e = assert_raises RDoc::RI::Driver::NotFoundError do + @driver.lookup_method 'Foo#i_methdo' + end + assert_equal "Nothing known about Foo#i_methdo\nDid you mean? i_method", e.message + + e = assert_raises RDoc::RI::Driver::NotFoundError do + @driver.lookup_method 'Foo::i_methdo' + end + assert_equal "Nothing known about Foo::i_methdo\nDid you mean? c_method", e.message + end + def test_formatter tty = Object.new def tty.tty?() true; end |