Sha256: 2e65e136c03352799bec3c4ad8cd21137bb4d3eeb1d7cc73fa834914e9b7597a
Contents?: true
Size: 798 Bytes
Versions: 3
Compression:
Stored size: 798 Bytes
Contents
# -*- encoding: utf-8 -*- require 'webgen/test_helper' require 'webgen/content_processor/maruku' class TestMaruku < MiniTest::Unit::TestCase include Webgen::TestHelper def setup setup_context @cp = Webgen::ContentProcessor::Maruku end def test_static_call @context.content = '# header' assert_equal('<h1 id=\'header\'>header</h1>', @cp.call(@context).content) @context.content = "# head*d* {#das .dsaf " assert_raises(MaRuKu::Exception) { @cp.call(@context) } end def test_static_call_fix_for_invalid_id @context.content = '# `test`' assert_equal('<h1 id=\'id1\'><code>test</code></h1>', @cp.call(@context).content) @context.content = '# `test`' assert_equal('<h1 id=\'id1\'><code>test</code></h1>', @cp.call(@context).content) end end
Version data entries
3 entries across 3 versions & 1 rubygems