Sha256: c21df3dba9a25f1737c876af5aa527d22a7d7caefa8836115623170157090638

Contents?: true

Size: 649 Bytes

Versions: 15

Compression:

Stored size: 649 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.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.run("body { color: #aabbcc; }", :colors => false)
      assert_equal("body{color:#aabbcc}", result)
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

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