Sha256: 08fea2bf006e0865ebe18db8ecce70d41bd4f3504c54b86a0c007bf8a74ade86

Contents?: true

Size: 687 Bytes

Versions: 2

Compression:

Stored size: 687 Bytes

Contents

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

class ArityTest < UnitTest
  class App < Sinatra::Base
    set :root, File.expand_path('../app', __FILE__)
    register Sinatra::AssetPack

    assets do |a|
      a.css :a, '/css/a.css', [
        '/css/s*.css',
        '/css/j*.css'
      ]

      a.js_compression :closure
      a.css_compression = :yui
    end
  end

  test "arity in #assets" do
    paths = App.assets.packages['a.css'].paths
    assert_equal paths,
      [ "/css/screen.css", "/css/sqwishable.css", "/css/style.css", "/css/stylus.css", "/css/js2c.css" ]

    assert App.assets.js_compression == :closure
    assert App.assets.css_compression == :yui
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinatra-assetpack-0.0.9 test/arity_test.rb
sinatra-assetpack-0.0.8 test/arity_test.rb