require 'koara' require 'koara/html/html5renderer' require 'minitest/autorun' class Html5RendererTest < MiniTest::Unit::TestCase def setup @parser = Koara::Parser.new @renderer = Koara::Html::Html5Renderer.new() end def test_render @document = @parser.parse('Test') @document.accept(@renderer) assert_equal("
Test
", @renderer.output) end def test_render_hardwrap_true @renderer.hard_wrap = true; @document = @parser.parse("a\nb") @document.accept(@renderer) assert_equal("a
\nb
Test
\n"; expected << " \n"; expected << "\n"; @renderer.partial = false; @document = @parser.parse('Test') @document.accept(@renderer) assert_equal(expected, @renderer.output) end def test_heading_ids_true @renderer.heading_ids = true; @document = @parser.parse('= A') @document.accept(@renderer) assert_equal("