aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_ri_driver.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_ri_driver.rb')
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb
index cba7bedb2a..ba334d3708 100644
--- a/test/rdoc/test_rdoc_ri_driver.rb
+++ b/test/rdoc/test_rdoc_ri_driver.rb
@@ -834,6 +834,24 @@ Foo::Bar#bother
end
end
+ def test_expand_class_2
+ @store1 = RDoc::RI::Store.new @home_ri, :home
+
+ @top_level = @store1.add_file 'file.rb'
+
+ @cFoo = @top_level.add_class RDoc::NormalClass, 'Foo'
+ @mFox = @top_level.add_module RDoc::NormalModule, 'Fox'
+ @cFoo_Bar = @cFoo.add_class RDoc::NormalClass, 'Bar'
+ @store1.save
+
+ @driver.stores = [@store1]
+ assert_raises RDoc::RI::Driver::NotFoundError do
+ @driver.expand_class 'F'
+ end
+ assert_equal 'Foo::Bar', @driver.expand_class('F::Bar')
+ assert_equal 'Foo::Bar', @driver.expand_class('F::B')
+ end
+
def test_expand_name
util_store