Sha256: 409aec9b849fec43d3bba0505fdd1825a41063b91c6f43bd25b729ae1365cb16

Contents?: true

Size: 676 Bytes

Versions: 3

Compression:

Stored size: 676 Bytes

Contents

# encoding: utf-8

require 'test/helper'

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

3 entries across 3 versions & 1 rubygems

Version Path
nanoc3-3.1.9 test/filters/test_rainpress.rb
nanoc3-3.1.8 test/filters/test_rainpress.rb
nanoc3-3.2.0a4 test/filters/test_rainpress.rb