diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rdoc/test_rdoc_class_module.rb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/test/rdoc/test_rdoc_class_module.rb b/test/rdoc/test_rdoc_class_module.rb index cc53a13528..138ede58b6 100644 --- a/test/rdoc/test_rdoc_class_module.rb +++ b/test/rdoc/test_rdoc_class_module.rb @@ -9,21 +9,24 @@ class TestRDocClassModule < XrefTestCase tl3 = @store.add_file 'three.rb' cm = RDoc::ClassModule.new 'Klass' - cm.add_comment '# comment 1', tl1 + comment_tl1 = RDoc::Comment.new('# comment 1') + cm.add_comment comment_tl1, tl1 - assert_equal [['comment 1', tl1]], cm.comment_location - assert_equal 'comment 1', cm.comment + assert_equal [[comment_tl1, tl1]], cm.comment_location + assert_equal 'comment 1', cm.comment.text - cm.add_comment '# comment 2', tl2 + comment_tl2 = RDoc::Comment.new('# comment 2') + cm.add_comment comment_tl2, tl2 - assert_equal [['comment 1', tl1], ['comment 2', tl2]], cm.comment_location + assert_equal [[comment_tl1, tl1], [comment_tl2, tl2]], cm.comment_location assert_equal "comment 1\n---\ncomment 2", cm.comment - cm.add_comment "# * comment 3", tl3 + comment_tl3 = RDoc::Comment.new('# * comment 3') + cm.add_comment comment_tl3, tl3 - assert_equal [['comment 1', tl1], - ['comment 2', tl2], - ['* comment 3', tl3]], cm.comment_location + assert_equal [[comment_tl1, tl1], + [comment_tl2, tl2], + [comment_tl3, tl3]], cm.comment_location assert_equal "comment 1\n---\ncomment 2\n---\n* comment 3", cm.comment end |