summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_top_level.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 03:22:49 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 03:22:49 +0000
commit2ef9c50c6e405717d06362787c4549ca4f1c6485 (patch)
treeee99486567461dd5796f3d6edcc9e204187f2666 /test/rdoc/test_rdoc_top_level.rb
parentd7effd506f5b91a636f2e6452ef1946b923007c7 (diff)
Import RDoc 3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_top_level.rb')
-rw-r--r--test/rdoc/test_rdoc_top_level.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/rdoc/test_rdoc_top_level.rb b/test/rdoc/test_rdoc_top_level.rb
index b96b74c182..f40a42b3f6 100644
--- a/test/rdoc/test_rdoc_top_level.rb
+++ b/test/rdoc/test_rdoc_top_level.rb
@@ -27,6 +27,17 @@ class TestRDocTopLevel < XrefTestCase
assert_equal expected, RDoc::TopLevel.classes.map { |m| m.full_name }.sort
end
+ def test_class_complete
+ @c2.add_module_alias @c2_c3, 'A1'
+
+ RDoc::TopLevel.complete :public
+
+ a1 = @xref_data.find_class_or_module 'C2::A1'
+
+ assert_equal 'C2::A1', a1.full_name
+ refute_empty a1.aliases
+ end
+
def test_class_files
assert_equal %w[path/top_level.rb xref_data.rb],
RDoc::TopLevel.files.map { |m| m.full_name }.sort
@@ -94,13 +105,11 @@ class TestRDocTopLevel < XrefTestCase
end
def test_last_modified
- assert_equal 'Unknown', @top_level.last_modified
-
+ assert_equal nil, @top_level.last_modified
stat = Object.new
def stat.mtime() 0 end
@top_level.file_stat = stat
-
- assert_equal '0', @top_level.last_modified
+ assert_equal 0, @top_level.last_modified
end
def test_name