summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_markup_to_joined_paragraph.rb
blob: 148edb177205b576b5a63eb2f83585bcd5c53ef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'rdoc/test_case'

class TestRDocMarkupToJoinedParagraph < RDoc::TestCase

  def setup
    super

    @to = RDoc::Markup::ToJoinedParagraph.new
  end

  def test_accept_paragraph
    parsed = para('hello', ' ', 'world')

    @to.accept_paragraph parsed

    expected = para('hello world')

    assert_equal expected, parsed
  end

  def test_accept_paragraph_break
    parsed = para('hello', ' ', 'world', hard_break, 'everyone')

    @to.accept_paragraph parsed

    expected = para('hello world', hard_break, 'everyone')

    assert_equal expected, parsed
  end

end