summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_markup_to_joined_paragraph.rb
blob: 414b7d3732c91176fcf37770514d0c1dbf68e3ca (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
33
# frozen_string_literal: false
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