Sha256: f1e6f1282ccb5bec4c7ff2075234fe881ac57c3b54dcae7e49f3c933ef6fc57d

Contents?: true

Size: 669 Bytes

Versions: 2

Compression:

Stored size: 669 Bytes

Contents

# encoding: utf-8

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

  include Nanoc::TestHelpers

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

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

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

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

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nanoc-3.6.1 test/filters/test_rainpress.rb
nanoc-3.6.0 test/filters/test_rainpress.rb