Sha256: fa2fc65394c3d08a724336c774923ee94c71d72e10d797590d7fb1f39a050ea8

Contents?: true

Size: 837 Bytes

Versions: 21

Compression:

Stored size: 837 Bytes

Contents

require 'test_helper'
require 'review/htmltoc'

class HTMLTocTest < Test::Unit::TestCase
  include ReVIEW

  def setup
  end

  def teardown
  end

  def test_tocfilename
    toc = HTMLToc.new('/var/tmp')
    assert_equal '/var/tmp/toc-html.txt', toc.tocfilename
  end

  def test_encode_args
    toc = HTMLToc.new('/var/tmp')
    assert_equal 'chaptype=pre', toc.encode_args(chaptype: 'pre')
    assert_equal 'force_include=true,chaptype=body,properties=foo', toc.encode_args({ force_include: true, chaptype: 'body', 'properties' => 'foo' })
  end

  def test_decode_args
    toc = HTMLToc.new('/var/tmp')
    assert_equal({ chaptype: 'pre' }, toc.decode_args('chaptype=pre'))
    assert_equal({ force_include: 'true', chaptype: 'body', properties: 'foo' }, toc.decode_args('force_include=true,chaptype=body,properties=foo'))
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
review-5.6.0 test/test_htmltoc.rb
review-5.5.0 test/test_htmltoc.rb
review-5.4.0 test/test_htmltoc.rb
review-5.3.0 test/test_htmltoc.rb
review-5.2.0 test/test_htmltoc.rb
review-5.1.1 test/test_htmltoc.rb
review-5.1.0 test/test_htmltoc.rb
review-5.0.0 test/test_htmltoc.rb
review-4.2.0 test/test_htmltoc.rb
review-4.1.0 test/test_htmltoc.rb
review-4.0.0 test/test_htmltoc.rb
review-3.2.0 test/test_htmltoc.rb
review-3.1.0 test/test_htmltoc.rb
review-3.0.0 test/test_htmltoc.rb
review-3.0.0.rc1 test/test_htmltoc.rb
review-3.0.0.preview4 test/test_htmltoc.rb
review-3.0.0.preview3 test/test_htmltoc.rb
review-3.0.0.preview2 test/test_htmltoc.rb
review-3.0.0.preview1 test/test_htmltoc.rb
review-2.5.0 test/test_htmltoc.rb