Sha256: 7e2b3f7e65aafcd1c33cd0ed47d94a48061f7e39ed34f2b0e4a95dff34a9ea8c

Contents?: true

Size: 896 Bytes

Versions: 20

Compression:

Stored size: 896 Bytes

Contents

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

20 entries across 20 versions & 1 rubygems

Version Path
nanoc-4.4.5 test/filters/test_rdiscount.rb
nanoc-4.4.4 test/filters/test_rdiscount.rb
nanoc-4.4.3 test/filters/test_rdiscount.rb
nanoc-4.4.2 test/filters/test_rdiscount.rb
nanoc-4.4.1 test/filters/test_rdiscount.rb
nanoc-4.4.0 test/filters/test_rdiscount.rb
nanoc-4.3.8 test/filters/test_rdiscount.rb
nanoc-4.3.7 test/filters/test_rdiscount.rb
nanoc-4.3.6 test/filters/test_rdiscount.rb
nanoc-4.3.5 test/filters/test_rdiscount.rb
nanoc-4.3.4 test/filters/test_rdiscount.rb
nanoc-4.3.3 test/filters/test_rdiscount.rb
nanoc-4.3.2 test/filters/test_rdiscount.rb
nanoc-4.3.1 test/filters/test_rdiscount.rb
nanoc-4.3.0 test/filters/test_rdiscount.rb
nanoc-4.2.4 test/filters/test_rdiscount.rb
nanoc-4.2.3 test/filters/test_rdiscount.rb
nanoc-4.2.2 test/filters/test_rdiscount.rb
nanoc-4.2.1 test/filters/test_rdiscount.rb
nanoc-4.2.0 test/filters/test_rdiscount.rb