Sha256: 5fa781048cea675c0eab3c4ae5459d0c85525adb39be86cf1673af35acd847d2

Contents?: true

Size: 713 Bytes

Versions: 32

Compression:

Stored size: 713 Bytes

Contents

class Nanoc::Filters::KramdownTest < Nanoc::TestCase
  def test_filter
    if_have 'kramdown' do
      # Create filter
      filter = ::Nanoc::Filters::Kramdown.new

      # Run filter
      result = filter.setup_and_run('This is _so_ **cool**!')
      assert_equal("<p>This is <em>so</em> <strong>cool</strong>!</p>\n", result)
    end
  end

  def test_warnings
    if_have 'kramdown' do
      # Create filter
      filter = ::Nanoc::Filters::Kramdown.new

      # Run filter
      io = capturing_stdio do
        filter.setup_and_run('{:foo}this is bogus')
      end
      assert_empty io[:stdout]
      assert_equal "kramdown warning: Found span IAL after text - ignoring it\n", io[:stderr]
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
nanoc-4.3.6 test/filters/test_kramdown.rb
nanoc-4.3.5 test/filters/test_kramdown.rb
nanoc-4.3.4 test/filters/test_kramdown.rb
nanoc-4.3.3 test/filters/test_kramdown.rb
nanoc-4.3.2 test/filters/test_kramdown.rb
nanoc-4.3.1 test/filters/test_kramdown.rb
nanoc-4.3.0 test/filters/test_kramdown.rb
nanoc-4.2.4 test/filters/test_kramdown.rb
nanoc-4.2.3 test/filters/test_kramdown.rb
nanoc-4.2.2 test/filters/test_kramdown.rb
nanoc-4.2.1 test/filters/test_kramdown.rb
nanoc-4.2.0 test/filters/test_kramdown.rb
nanoc-4.1.6 test/filters/test_kramdown.rb
nanoc-4.2.0b1 test/filters/test_kramdown.rb
nanoc-4.1.5 test/filters/test_kramdown.rb
nanoc-4.1.4 test/filters/test_kramdown.rb
nanoc-4.1.3 test/filters/test_kramdown.rb
nanoc-4.1.2 test/filters/test_kramdown.rb
nanoc-4.1.1 test/filters/test_kramdown.rb
nanoc-4.1.0 test/filters/test_kramdown.rb