Sha256: a53b95801333490de3943ee93ec8bcbe8df1a6de048dd1a5c62510547b5b273b
Contents?: true
Size: 802 Bytes
Versions: 1
Compression:
Stored size: 802 Bytes
Contents
# encoding: utf-8 class Nanoc::Filters::PandocTest < Nanoc::TestCase def test_filter if_have 'pandoc-ruby' do skip_unless_have_command 'pandoc' # Create filter filter = ::Nanoc::Filters::Pandoc.new # Run filter result = filter.setup_and_run("# Heading\n") assert_match(%r{<h1 id=\"heading\">Heading</h1>\s*}, result) end end def test_params if_have 'pandoc-ruby' do skip_unless_have_command 'pandoc' # Create filter filter = ::Nanoc::Filters::Pandoc.new # Run filter opts = [:s, { f: :markdown, to: :html }, 'no-wrap', :toc] result = filter.setup_and_run("# Heading\n", *opts) assert_match '<div id="TOC">', result assert_match(%r{<h1 id=\"heading\">Heading</h1>\s*}, result) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nanoc-3.7.5 | test/filters/test_pandoc.rb |