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.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_class_module.rb b/test/rdoc/test_rdoc_class_module.rb
index e5d855b2cd..670f732290 100644
--- a/test/rdoc/test_rdoc_class_module.rb
+++ b/test/rdoc/test_rdoc_class_module.rb
@@ -41,6 +41,16 @@ class TestRDocClassModule < XrefTestCase
assert_equal 'comment', cm.comment.text
end
+ def test_add_comment_duplicate
+ tl1 = @store.add_file 'one.rb'
+
+ cm = RDoc::ClassModule.new 'Klass'
+ cm.add_comment '# comment 1', tl1
+ cm.add_comment '# comment 2', tl1
+
+ assert_equal [['comment 2', tl1]], cm.comment_location
+ end
+
def test_add_comment_stopdoc
tl = @store.add_file 'file.rb'