Sha256: 79c32b8ddd2249746261d8fd5b6fa9d5564b46082622b4ca9b906d99ac38251c

Contents?: true

Size: 788 Bytes

Versions: 20

Compression:

Stored size: 788 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

class SqwishTest < UnitTest
  setup do
    app.set :reload_templates, true
    app.assets.css_compression :sqwish, :strict => true
  end

  teardown do
    app.assets.css_compression :simple
    app.assets.css_compression_options.delete :strict
  end

  def self.sqwish?
    `which sqwish` && true rescue false
  end

  test "css compression options" do
    assert app.assets.css_compression_options[:strict] == true
  end

  if sqwish?
    test "build" do
      swqished_css = '#bg{background:green;color:red}'
      Sinatra::AssetPack::SqwishEngine.any_instance.expects(:css).returns swqished_css
      get '/css/sq.css'
      assert body == swqished_css
    end
  else
    puts "(No Sqwish found; skipping sqwish tests)"
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
sinatra-assetpack-0.3.5 test/sqwish_test.rb
sinatra-assetpack-0.3.3 test/sqwish_test.rb
sinatra-assetpack-0.3.2 test/sqwish_test.rb
sinatra-assetpack-0.3.1 test/sqwish_test.rb
sinatra-assetpack-0.3.0 test/sqwish_test.rb
sinatra-assetpack-0.2.8 test/sqwish_test.rb
sinatra-assetpack-0.2.7 test/sqwish_test.rb
sinatra-assetpack-0.2.6 test/sqwish_test.rb
sinatra-assetpack-0.2.5 test/sqwish_test.rb
sinatra-assetpack-0.2.4 test/sqwish_test.rb
sinatra-assetpack-0.2.3 test/sqwish_test.rb
sinatra-assetpack-0.2.2 test/sqwish_test.rb
sinatra-assetpack-0.2.1 test/sqwish_test.rb
sinatra-assetpack-0.2.0 test/sqwish_test.rb
sinatra-assetpack-0.1.7 test/sqwish_test.rb
sundawg-sinatra-assetpack-fork-0.1.6 test/sqwish_test.rb
sinatra-assetpack-0.1.6 test/sqwish_test.rb
sinatra-assetpack-0.1.5 test/sqwish_test.rb
sinatra-assetpack-0.1.4 test/sqwish_test.rb
sinatra-assetpack-0.1.3 test/sqwish_test.rb