summaryrefslogtreecommitdiff
path: root/trunk/test/rdoc/test_rdoc_ri_driver.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:13:14 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:13:14 +0000
commitd0233291bc8a5068e52c69c210e5979e5324b5bc (patch)
tree7d9459449c33792c63eeb7baa071e76352e0baab /trunk/test/rdoc/test_rdoc_ri_driver.rb
parent0dc342de848a642ecce8db697b8fecd83a63e117 (diff)
parent72eaacaa15256ab95c3b52ea386f88586fb9da40 (diff)
re-adding tag v1_9_0_4 as an alias of trunk@18848v1_9_0_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'trunk/test/rdoc/test_rdoc_ri_driver.rb')
-rw-r--r--trunk/test/rdoc/test_rdoc_ri_driver.rb92
1 files changed, 0 insertions, 92 deletions
diff --git a/trunk/test/rdoc/test_rdoc_ri_driver.rb b/trunk/test/rdoc/test_rdoc_ri_driver.rb
deleted file mode 100644
index cddd4e60d1..0000000000
--- a/trunk/test/rdoc/test_rdoc_ri_driver.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-require 'test/unit'
-require 'tmpdir'
-require 'rdoc/ri/driver'
-
-class TestRDocRIDriver < Test::Unit::TestCase
-
- def setup
- @tmpdir = File.join Dir.tmpdir, "test_rdoc_ri_driver_#{$$}"
- @home_ri = File.join @tmpdir, 'dot_ri'
- @cache_dir = File.join @home_ri, 'cache'
- @class_cache = File.join @cache_dir, 'classes'
-
- FileUtils.mkdir_p @tmpdir
- FileUtils.mkdir_p @home_ri
- FileUtils.mkdir_p @cache_dir
-
- @driver = RDoc::RI::Driver.new
- @driver.homepath = @home_ri
- end
-
- def teardown
- FileUtils.rm_rf @tmpdir
- end
-
- def test_lookup_method
- def @driver.load_cache_for(klassname)
- { 'Foo#bar' => :found }
- end
-
- assert @driver.lookup_method('Foo#bar', 'Foo')
- end
-
- def test_lookup_method_class_method
- def @driver.load_cache_for(klassname)
- { 'Foo::Bar' => :found }
- end
-
- assert @driver.lookup_method('Foo::Bar', 'Foo::Bar')
- end
-
- def test_lookup_method_class_missing
- def @driver.load_cache_for(klassname) end
-
- assert_nil @driver.lookup_method('Foo#bar', 'Foo')
- end
-
- def test_lookup_method_dot_instance
- def @driver.load_cache_for(klassname)
- { 'Foo#bar' => :instance, 'Foo::bar' => :klass }
- end
-
- assert_equal :instance, @driver.lookup_method('Foo.bar', 'Foo')
- end
-
- def test_lookup_method_dot_class
- def @driver.load_cache_for(klassname)
- { 'Foo::bar' => :found }
- end
-
- assert @driver.lookup_method('Foo.bar', 'Foo')
- end
-
- def test_lookup_method_method_missing
- def @driver.load_cache_for(klassname) {} end
-
- assert_nil @driver.lookup_method('Foo#bar', 'Foo')
- end
-
- def test_parse_name
- klass, meth = @driver.parse_name 'Foo::Bar'
-
- assert_equal 'Foo::Bar', klass, 'Foo::Bar class'
- assert_equal nil, meth, 'Foo::Bar method'
-
- klass, meth = @driver.parse_name 'Foo#Bar'
-
- assert_equal 'Foo', klass, 'Foo#Bar class'
- assert_equal 'Bar', meth, 'Foo#Bar method'
-
- klass, meth = @driver.parse_name 'Foo.Bar'
-
- assert_equal 'Foo', klass, 'Foo#Bar class'
- assert_equal 'Bar', meth, 'Foo#Bar method'
-
- klass, meth = @driver.parse_name 'Foo::bar'
-
- assert_equal 'Foo', klass, 'Foo::bar class'
- assert_equal 'bar', meth, 'Foo::bar method'
- end
-
-end
-