1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc/class_module.rb: Added RDoc::ClassModule#documented? which

checks comment_location.  Hide RDoc::ClassModule#comment=.
* test/rdoc/test_rdoc_class_module.rb:  Test for above.

* lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml:
  Fix display of the table of contents in the sidebar.

* lib/rdoc/generator/template/darkfish/table_of_contents.rhtml:
  Use #comment_location when displaying classes or modules.

* test/rdoc/test_rdoc_store.rb:  Use comment_location.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-12-12 05:16:53 +00:00
parent f92db3dd73
commit 182ce60f75
6 changed files with 54 additions and 4 deletions

View file

@ -95,6 +95,28 @@ class TestRDocClassModule < XrefTestCase
refute @c1.document_self_or_methods
end
def test_documented_eh
cm = RDoc::ClassModule.new 'C'
refute cm.documented?
cm.add_comment 'hi', @top_level
assert cm.documented?
cm.comment.replace ''
assert cm.documented?
cm.comment_location.clear
refute cm.documented?
cm.document_self = nil # notify :nodoc:
assert cm.documented?
end
def test_each_ancestor
assert_equal [@parent], @child.each_ancestor.to_a
end