1require 'rdoc/test_case' 2 3class TestRDocRd < RDoc::TestCase 4 5 def test_class_parse 6 expected = 7 @RM::Document.new( 8 @RM::Paragraph.new('hello')) 9 10 assert_equal expected, RDoc::RD.parse("hello") 11 end 12 13 def test_class_parse_begin_end 14 expected = 15 @RM::Document.new( 16 @RM::Paragraph.new('hello')) 17 18 assert_equal expected, RDoc::RD.parse("=begin\nhello\n=end\n") 19 end 20 21 def test_class_parse_newline 22 expected = 23 @RM::Document.new( 24 @RM::Paragraph.new('hello')) 25 26 assert_equal expected, RDoc::RD.parse("hello\n") 27 end 28 29end 30 31