summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rdoc/test_rdoc_class_module.rb22
-rw-r--r--test/rdoc/test_rdoc_store.rb2
2 files changed, 23 insertions, 1 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
diff --git a/test/rdoc/test_rdoc_store.rb b/test/rdoc/test_rdoc_store.rb
index 1bf42bc92c..a5a5adec7b 100644
--- a/test/rdoc/test_rdoc_store.rb
+++ b/test/rdoc/test_rdoc_store.rb
@@ -708,7 +708,7 @@ class TestRDocStore < XrefTestCase
document = @RM::Document.new inner
- assert_equal document, s.load_class('Object').comment
+ assert_equal document, s.load_class('Object').comment_location
end
# This is a functional test