Sha256: 3b5fbde3e0f2e1a3814a56395a37360c1c194866da3db02344ae4a42761ad6bd

Contents?: true

Size: 808 Bytes

Versions: 14

Compression:

Stored size: 808 Bytes

Contents

# encoding: utf-8

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

14 entries across 14 versions & 1 rubygems

Version Path
nanoc-3.7.3 test/filters/test_rdiscount.rb
nanoc-3.7.2 test/filters/test_rdiscount.rb
nanoc-3.7.1 test/filters/test_rdiscount.rb
nanoc-3.7.0 test/filters/test_rdiscount.rb
nanoc-3.6.11 test/filters/test_rdiscount.rb
nanoc-3.6.10 test/filters/test_rdiscount.rb
nanoc-3.6.9 test/filters/test_rdiscount.rb
nanoc-3.6.8 test/filters/test_rdiscount.rb
nanoc-3.6.7 test/filters/test_rdiscount.rb
nanoc-3.6.6 test/filters/test_rdiscount.rb
nanoc-3.6.5 test/filters/test_rdiscount.rb
nanoc-3.6.4 test/filters/test_rdiscount.rb
nanoc-3.6.3 test/filters/test_rdiscount.rb
nanoc-3.6.2 test/filters/test_rdiscount.rb