class HTMLTocTest

Public Instance Methods

setup() click to toggle source
# File ../../../../../test/test_htmltoc.rb, line 7
def setup
end
teardown() click to toggle source
# File ../../../../../test/test_htmltoc.rb, line 10
def teardown
end
test_decode_args() click to toggle source
# File ../../../../../test/test_htmltoc.rb, line 24
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
test_encode_args() click to toggle source
# File ../../../../../test/test_htmltoc.rb, line 18
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
test_tocfilename() click to toggle source
# File ../../../../../test/test_htmltoc.rb, line 13
def test_tocfilename
  toc = HTMLToc.new('/var/tmp')
  assert_equal '/var/tmp/toc-html.txt', toc.tocfilename
end