1require 'rdoc/test_case' 2 3class TestRDocMarkupRaw < RDoc::TestCase 4 5 def setup 6 super 7 8 @p = @RM::Raw.new 9 end 10 11 def mu_pp obj 12 s = '' 13 s = PP.pp obj, s 14 s.force_encoding Encoding.default_external if defined? Encoding 15 s.chomp 16 end 17 18 def test_push 19 @p.push 'hi', 'there' 20 21 assert_equal @RM::Raw.new('hi', 'there'), @p 22 end 23 24 def test_pretty_print 25 assert_equal '[raw: ]', mu_pp(@p) 26 end 27 28end 29 30