summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_class_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_class_module.rb')
-rw-r--r--test/rdoc/test_rdoc_class_module.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_class_module.rb b/test/rdoc/test_rdoc_class_module.rb
index a6aa1e9472..e5d855b2cd 100644
--- a/test/rdoc/test_rdoc_class_module.rb
+++ b/test/rdoc/test_rdoc_class_module.rb
@@ -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