aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_markup_indented_paragraph.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_markup_indented_paragraph.rb')
-rw-r--r--test/rdoc/test_rdoc_markup_indented_paragraph.rb23
1 files changed, 18 insertions, 5 deletions
diff --git a/test/rdoc/test_rdoc_markup_indented_paragraph.rb b/test/rdoc/test_rdoc_markup_indented_paragraph.rb
index e3e2b630e1..d8dd795e5b 100644
--- a/test/rdoc/test_rdoc_markup_indented_paragraph.rb
+++ b/test/rdoc/test_rdoc_markup_indented_paragraph.rb
@@ -1,11 +1,10 @@
-require 'pp'
-require 'rubygems'
-require 'minitest/autorun'
-require 'rdoc/markup'
+require 'rdoc/test_case'
-class TestRDocMarkupIndentedParagraph < MiniTest::Unit::TestCase
+class TestRDocMarkupIndentedParagraph < RDoc::TestCase
def setup
+ super
+
@IP = RDoc::Markup::IndentedParagraph
end
@@ -36,5 +35,19 @@ class TestRDocMarkupIndentedParagraph < MiniTest::Unit::TestCase
refute_equal one, two
end
+ def test_text
+ paragraph = @IP.new(2, 'hello', ' world')
+
+ assert_equal 'hello world', paragraph.text
+ end
+
+ def test_text_break
+ paragraph = @IP.new(2, 'hello', hard_break, 'world')
+
+ assert_equal 'helloworld', paragraph.text
+
+ assert_equal "hello\n world", paragraph.text("\n")
+ end
+
end