Sha256: a4de8986b89961133934df4886dae8f0359713f5c684d66f8066e687443d944a

Contents?: true

Size: 945 Bytes

Versions: 18

Compression:

Stored size: 945 Bytes

Contents

# frozen_string_literal: true

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

18 entries across 18 versions & 1 rubygems

Version Path
nanoc-4.8.12 test/filters/test_rdiscount.rb
nanoc-4.8.11 test/filters/test_rdiscount.rb
nanoc-4.8.10 test/filters/test_rdiscount.rb
nanoc-4.8.9 test/filters/test_rdiscount.rb
nanoc-4.8.8 test/filters/test_rdiscount.rb
nanoc-4.8.7 test/filters/test_rdiscount.rb
nanoc-4.8.6 test/filters/test_rdiscount.rb
nanoc-4.8.5 test/filters/test_rdiscount.rb
nanoc-4.8.4 test/filters/test_rdiscount.rb
nanoc-4.8.3 test/filters/test_rdiscount.rb
nanoc-4.8.2 test/filters/test_rdiscount.rb
nanoc-4.8.1 test/filters/test_rdiscount.rb
nanoc-4.8.0 test/filters/test_rdiscount.rb
nanoc-4.7.14 test/filters/test_rdiscount.rb
nanoc-4.7.13 test/filters/test_rdiscount.rb
nanoc-4.7.12 test/filters/test_rdiscount.rb
nanoc-4.7.11 test/filters/test_rdiscount.rb
nanoc-4.7.10 test/filters/test_rdiscount.rb