Sha256: b4ce801a12e81302c745510502dac90dc20eb103d6fb4a0547218b3591a7b2df

Contents?: true

Size: 575 Bytes

Versions: 4

Compression:

Stored size: 575 Bytes

Contents

require 'rdoc/test_case'

class TestRDocMarkupHeading < RDoc::TestCase

  def setup
    super

    @h = RDoc::Markup::Heading.new 1, 'Hello *Friend*!'
  end

  def test_aref
    assert_equal 'label-Hello+Friend-21', @h.aref
  end

  def test_label
    assert_equal 'label-Hello+Friend-21', @h.label
    assert_equal 'label-Hello+Friend-21', @h.label(nil)

    context = RDoc::NormalClass.new 'Foo'

    assert_equal 'class-Foo-label-Hello+Friend-21', @h.label(context)
  end

  def test_plain_html
    assert_equal 'Hello <strong>Friend</strong>!', @h.plain_html
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rdoc-4.3.0 test/test_rdoc_markup_heading.rb
rdoc-4.2.2 test/test_rdoc_markup_heading.rb
rdoc-4.2.1 test/test_rdoc_markup_heading.rb
rdoc-4.2.0 test/test_rdoc_markup_heading.rb