summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_rd.rb
blob: 83ee4234551715467c0a6350b6b2447243c95174 (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
# frozen_string_literal: true
require_relative 'helper'

class TestRDocRd < RDoc::TestCase

  def test_class_parse
    expected =
      @RM::Document.new(
        @RM::Paragraph.new('hello'))

    assert_equal expected, RDoc::RD.parse("hello")
  end

  def test_class_parse_begin_end
    expected =
      @RM::Document.new(
        @RM::Paragraph.new('hello'))

    assert_equal expected, RDoc::RD.parse("=begin\nhello\n=end\n")
  end

  def test_class_parse_newline
    expected =
      @RM::Document.new(
        @RM::Paragraph.new('hello'))

    assert_equal expected, RDoc::RD.parse("hello\n")
  end

end