Sha256: 659e5baa1672ba6c547d3d53f8ba5794f7cbe8c6fd745d31e5b229e4da891954

Contents?: true

Size: 914 Bytes

Versions: 22

Compression:

Stored size: 914 Bytes

Contents

require 'helper'

class Nanoc::Filters::RDiscountTest < Nanoc::TestCase
  def test_filter
    if_have 'rdiscount' do
      # Create filter
      filter = ::Nanoc::Filters::RDiscount.new

      # Run filter
      result = filter.setup_and_run('> Quote')
      assert_match(/<blockquote>\s*<p>Quote<\/p>\s*<\/blockquote>/, result)
    end
  end

  # FIXME: Re-enable this test (flaky; quotation marks are not transformed consistently)
  # def test_with_extensions
  #   if_have 'rdiscount' do
  #     # Create filter
  #     filter = ::Nanoc::Filters::RDiscount.new
  #
  #     # Run filter
  #     input           = "The quotation 'marks' sure make this look sarcastic!"
  #     output_expected = /The quotation &lsquo;marks&rsquo; sure make this look sarcastic!/
  #     output_actual   = filter.setup_and_run(input, extensions: [:smart])
  #     assert_match(output_expected, output_actual)
  #   end
  # end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
nanoc-4.7.9 test/filters/test_rdiscount.rb
nanoc-4.7.8 test/filters/test_rdiscount.rb
nanoc-4.7.7 test/filters/test_rdiscount.rb
nanoc-4.7.6 test/filters/test_rdiscount.rb
nanoc-4.7.5 test/filters/test_rdiscount.rb
nanoc-4.7.4 test/filters/test_rdiscount.rb
nanoc-4.7.3 test/filters/test_rdiscount.rb
nanoc-4.7.2 test/filters/test_rdiscount.rb
nanoc-4.7.1 test/filters/test_rdiscount.rb
nanoc-4.7.0 test/filters/test_rdiscount.rb
nanoc-4.6.4 test/filters/test_rdiscount.rb
nanoc-4.6.3 test/filters/test_rdiscount.rb
nanoc-4.6.2 test/filters/test_rdiscount.rb
nanoc-4.6.1 test/filters/test_rdiscount.rb
nanoc-4.6.0 test/filters/test_rdiscount.rb
nanoc-4.5.4 test/filters/test_rdiscount.rb
nanoc-4.5.3 test/filters/test_rdiscount.rb
nanoc-4.5.2 test/filters/test_rdiscount.rb
nanoc-4.5.1 test/filters/test_rdiscount.rb
nanoc-4.5.0 test/filters/test_rdiscount.rb