Sha256: 7004ff2766b9aa8d73a59c9b2f97aedd2147ad97699184dc6e52faeb05fcc76b

Contents?: true

Size: 833 Bytes

Versions: 15

Compression:

Stored size: 833 Bytes

Contents

# encoding: utf-8

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

  include Nanoc::TestHelpers

  def test_filter
    if_have 'redcloth' do
      # Get filter
      filter = ::Nanoc::Filters::RedCloth.new

      # Run filter
      result = filter.run("h1. Foo")
      assert_equal("<h1>Foo</h1>", result)
    end
  end

  def test_filter_with_options
    if_have 'redcloth' do
      # Get filter
      filter = ::Nanoc::Filters::RedCloth.new

      # Run filter without options
      result = filter.run("I am a member of SPECTRE.")
      assert_equal("<p>I am a member of <span class=\"caps\">SPECTRE</span>.</p>", result)

      # Run filter with options
      result = filter.run("I am a member of SPECTRE.", :no_span_caps => true)
      assert_equal("<p>I am a member of SPECTRE.</p>", result)
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

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