Sha256: 7eda5746293330c04030d9162ae8cf8a27ada4599c6e3c0303032e746776f607

Contents?: true

Size: 1.19 KB

Versions: 14

Compression:

Stored size: 1.19 KB

Contents

require 'rdoc/test_case'

class TestRDocGeneratorMarkup < RDoc::TestCase

  include RDoc::Text
  include RDoc::Generator::Markup

  attr_reader :store

  def setup
    super

    @options = RDoc::Options.new
    @rdoc.options = @options

    @parent = self
    @path = '/index.html'
    @symbols = {}
  end

  def test_aref_to
    assert_equal 'Foo/Bar.html', aref_to('Foo/Bar.html')
  end

  def test_as_href
    assert_equal '../index.html', as_href('Foo/Bar.html')
  end

  def test_cvs_url
    assert_equal 'http://example/this_page',
                 cvs_url('http://example/', 'this_page')

    assert_equal 'http://example/?page=this_page&foo=bar',
                 cvs_url('http://example/?page=%s&foo=bar', 'this_page')
  end

  def test_description
    @comment = '= Hello'

    links = '<span><a href="#label-Hello">&para;</a> ' +
            '<a href="#documentation">&uarr;</a></span>'

    assert_equal "\n<h1 id=\"label-Hello\">Hello#{links}</h1>\n", description
  end

  def test_formatter
    assert_kind_of RDoc::Markup::ToHtmlCrossref, formatter
    refute formatter.show_hash
    assert_same self, formatter.context
  end

  attr_reader :path

  def find_symbol name
    @symbols[name]
  end

end

Version data entries

14 entries across 10 versions & 3 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/rdoc-4.1.1/test/test_rdoc_generator_markup.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/rdoc-4.1.1/test/test_rdoc_generator_markup.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/rdoc-4.1.1/test/test_rdoc_generator_markup.rb
rdoc-4.1.2 test/test_rdoc_generator_markup.rb
rdoc-4.1.1 test/test_rdoc_generator_markup.rb
rdoc-4.1.0 test/test_rdoc_generator_markup.rb
rdoc-4.1.0.preview.3 test/test_rdoc_generator_markup.rb
candlepin-api-0.4.0 bundle/ruby/gems/rdoc-4.0.1/test/test_rdoc_generator_markup.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/rdoc-4.0.1/test/test_rdoc_generator_markup.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/rdoc-4.0.1/test/test_rdoc_generator_markup.rb
rdoc-4.0.1 test/test_rdoc_generator_markup.rb
rdoc-4.0.0 test/test_rdoc_generator_markup.rb
rdoc-4.0.0.rc.2.1 test/test_rdoc_generator_markup.rb
rdoc-4.0.0.rc.2 test/test_rdoc_generator_markup.rb