Sha256: edab872f0bfef569b6e87cbde9e887f2ec42e1a38bd6b42b263e1efc41a2ff29

Contents?: true

Size: 827 Bytes

Versions: 15

Compression:

Stored size: 827 Bytes

Contents

# encoding: utf-8

class Nanoc::Filters::RDiscountTest < MiniTest::Unit::TestCase

  include Nanoc::TestHelpers

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

      # Run filter
      result = filter.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.run(input, :extensions => [ :smart ])
      assert_match(output_expected, output_actual)
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-3.5.0 test/filters/test_rdiscount.rb
nanoc-3.5.0b2 test/filters/test_rdiscount.rb
nanoc-3.5.0b1 test/filters/test_rdiscount.rb
nanoc-3.4.3 test/filters/test_rdiscount.rb
nanoc-3.4.2 test/filters/test_rdiscount.rb
nanoc-3.4.1 test/filters/test_rdiscount.rb
nanoc-3.4.0 test/filters/test_rdiscount.rb
nanoc-3.3.7 test/filters/test_rdiscount.rb
nanoc-3.3.6 test/filters/test_rdiscount.rb
nanoc-3.3.5 test/filters/test_rdiscount.rb
nanoc-3.3.4 test/filters/test_rdiscount.rb
nanoc-3.3.3 test/filters/test_rdiscount.rb
nanoc-3.3.2 test/filters/test_rdiscount.rb
nanoc-3.3.1 test/filters/test_rdiscount.rb
nanoc-3.3.0 test/filters/test_rdiscount.rb