Sha256: 1853481bb9354c71b7b2b536577c91d246a8e29d8e46b6840b2eabaf200dc5ec
Contents?: true
Size: 1010 Bytes
Versions: 2
Compression:
Stored size: 1010 Bytes
Contents
# -*- encoding: utf-8 -*- require 'test/unit' require 'helper' require 'webgen/node' require 'webgen/tree' require 'webgen/contentprocessor' class TestContentProcessorMaruku < Test::Unit::TestCase def test_call @obj = Webgen::ContentProcessor::Maruku.new node = Webgen::Node.new(Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/'), 'test', 'test') context = Webgen::Context.new(:content => '# header', :chain => [node]) assert_equal('<h1 id=\'header\'>header</h1>', @obj.call(context).content) context.content = "# head*d* {#das .dsaf " assert_raise(RuntimeError) { @obj.call(context)} end def test_call_fix_for_invalid_id @obj = Webgen::ContentProcessor::Maruku.new context = Webgen::Context.new(:content => '# `test`') assert_equal('<h1 id=\'id1\'><code>test</code></h1>', @obj.call(context).content) context = Webgen::Context.new(:content => '# `test`') assert_equal('<h1 id=\'id1\'><code>test</code></h1>', @obj.call(context).content) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gettalong-webgen-0.5.9.20090620 | test/test_contentprocessor_maruku.rb |
gettalong-webgen-0.5.9.20090626 | test/test_contentprocessor_maruku.rb |