Sha256: bfe2d0d20ea2f1a631cc503417d7718027e4f48927631f7028b0de2d0e9165c2

Contents?: true

Size: 653 Bytes

Versions: 8

Compression:

Stored size: 653 Bytes

Contents

# encoding: utf-8

class Nanoc3::Filters::RainpressTest < MiniTest::Unit::TestCase

  include Nanoc3::TestHelpers

  def test_filter
    if_have 'rainpress' do
      # Create filter
      filter = ::Nanoc3::Filters::Rainpress.new

      # Run filter
      result = filter.run("body { color: black; }")
      assert_equal("body{color:#000}", result)
    end
  end

  def test_filter_with_options
    if_have 'rainpress' do
      # Create filter
      filter = ::Nanoc3::Filters::Rainpress.new

      # Run filter
      result = filter.run("body { color: #aabbcc; }", :colors => false)
      assert_equal("body{color:#aabbcc}", result)
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nanoc3-3.2.4 test/filters/test_rainpress.rb
nanoc3-3.2.3 test/filters/test_rainpress.rb
nanoc3-3.2.2 test/filters/test_rainpress.rb
nanoc3-3.2.1 test/filters/test_rainpress.rb
nanoc3-3.2.0 test/filters/test_rainpress.rb
nanoc3-3.2.0b3 test/filters/test_rainpress.rb
nanoc3-3.2.0b2 test/filters/test_rainpress.rb
nanoc3-3.2.0b1 test/filters/test_rainpress.rb