diff options
Diffstat (limited to 'test/rdoc/test_rdoc_markup_paragraph.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_paragraph.rb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/test/rdoc/test_rdoc_markup_paragraph.rb b/test/rdoc/test_rdoc_markup_paragraph.rb index 6ae1ad9a84..8de1c3cff5 100644 --- a/test/rdoc/test_rdoc_markup_paragraph.rb +++ b/test/rdoc/test_rdoc_markup_paragraph.rb @@ -1,9 +1,6 @@ -require 'pp' -require 'rubygems' -require 'minitest/autorun' -require 'rdoc/markup' +require 'rdoc/test_case' -class TestRDocMarkupParagraph < MiniTest::Unit::TestCase +class TestRDocMarkupParagraph < RDoc::TestCase def test_accept visitor = Object.new @@ -14,7 +11,21 @@ class TestRDocMarkupParagraph < MiniTest::Unit::TestCase paragraph.accept visitor - assert_equal paragraph, visitor.obj + assert_same paragraph, visitor.obj + end + + def test_text + paragraph = para('hello', ' world') + + assert_equal 'hello world', paragraph.text + end + + def test_text_break + paragraph = para('hello', hard_break, 'world') + + assert_equal 'helloworld', paragraph.text + + assert_equal "hello\nworld", paragraph.text("\n") end end |