Sha256: 920754145288cfa64e6e6870428ba99f3432e42c3aaf8f77a314b757c65a5ec3

Contents?: true

Size: 782 Bytes

Versions: 20

Compression:

Stored size: 782 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

  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.1.6 test/filters/test_rdiscount.rb
nanoc-4.2.0b1 test/filters/test_rdiscount.rb
nanoc-4.1.5 test/filters/test_rdiscount.rb
nanoc-4.1.4 test/filters/test_rdiscount.rb
nanoc-4.1.3 test/filters/test_rdiscount.rb
nanoc-4.1.2 test/filters/test_rdiscount.rb
nanoc-4.1.1 test/filters/test_rdiscount.rb
nanoc-4.1.0 test/filters/test_rdiscount.rb
nanoc-4.1.0rc2 test/filters/test_rdiscount.rb
nanoc-4.1.0rc1 test/filters/test_rdiscount.rb
nanoc-4.1.0b1 test/filters/test_rdiscount.rb
nanoc-4.1.0a1 test/filters/test_rdiscount.rb
nanoc-4.0.2 test/filters/test_rdiscount.rb
nanoc-4.0.1 test/filters/test_rdiscount.rb
nanoc-4.0.0 test/filters/test_rdiscount.rb
nanoc-4.0.0rc3 test/filters/test_rdiscount.rb
nanoc-4.0.0rc2 test/filters/test_rdiscount.rb
nanoc-4.0.0rc1 test/filters/test_rdiscount.rb
nanoc-4.0.0b4 test/filters/test_rdiscount.rb
nanoc-4.0.0b3 test/filters/test_rdiscount.rb