diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-18 23:33:36 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-18 23:33:36 +0000 |
commit | df7dac9174a31e71b58be6184e23bfe6b742a494 (patch) | |
tree | 885edf624f0e8f37014b0d937340ac1c372a0066 /test/rdoc/test_rdoc_ri_driver.rb | |
parent | fed428007c015ac3b7f4586f2491517fafffa030 (diff) |
* lib/rdoc: Update to RDoc 4.1.0.preview.1
RDoc 4.1.0 contains a number of enhancements including a new default
style and accessibility support. You can see the changelog here:
https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
* test/rdoc: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42971 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 | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb index 92403e12f4..d0987a01c3 100644 --- a/test/rdoc/test_rdoc_ri_driver.rb +++ b/test/rdoc/test_rdoc_ri_driver.rb @@ -46,13 +46,6 @@ class TestRDocRIDriver < RDoc::TestCase ENV['RI_PAGER'] = pager_env end - def mu_pp(obj) - s = '' - s = PP.pp obj, s - s = s.force_encoding(Encoding.default_external) if defined? Encoding - s.chomp - end - def test_self_dump util_store @@ -696,6 +689,14 @@ Foo::Bar#bother assert_equal expected, out end + def test_display_name_not_found_special + util_store + + assert_raises RDoc::RI::Driver::NotFoundError do + assert_equal false, @driver.display_name('Set#[]') + end + end + def test_display_method_params util_store @@ -939,7 +940,10 @@ Foo::Bar#bother tty = Object.new def tty.tty?() true; end - driver = RDoc::RI::Driver.new + @options.delete :use_stdout + @options.delete :formatter + + driver = RDoc::RI::Driver.new @options assert_instance_of @RM::ToAnsi, driver.formatter(tty) @@ -1094,6 +1098,17 @@ Foo::Bar#bother assert_equal expected, @driver.load_methods_matching('Bar#inherit') end + def test_load_method_missing + util_store + + FileUtils.rm @store1.method_file 'Foo', '#inherit' + + method = @driver.load_method(@store1, :instance_methods, 'Foo', '#', + 'inherit') + + assert_equal '(unknown)#inherit', method.full_name + end + def _test_page # this test doesn't do anything anymore :( @driver.use_stdout = false |