Sha256: 7374ad4a223696f031ead8e4acf874d9c17a0605423ad869452ba9eaab773344

Contents?: true

Size: 621 Bytes

Versions: 9

Compression:

Stored size: 621 Bytes

Contents

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

class IgnoreTest < UnitTest
  class App < UnitTest::App
    register Sinatra::AssetPack

    assets do
      js :main, '/main.js', %w[/js/*.js]
    end
  end

  def app
    App
  end

  test "ignore as individual file" do
    get '/js/_ignoreme.js'
    assert last_response.status == 404
  end

  test "ignore in package" do
    get '/main.js'
    assert last_response.body.size > 0
    assert !last_response.body.include?("BUMBLEBEE")
  end

  test "package files" do
    assert !app.assets.packages['main.js'].files.any? { |s| s.include? '_ignoreme.js' }
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
sinatra-assetpack-0.2.2 test/ignore_test.rb
sinatra-assetpack-0.2.1 test/ignore_test.rb
sinatra-assetpack-0.2.0 test/ignore_test.rb
sinatra-assetpack-0.1.7 test/ignore_test.rb
sundawg-sinatra-assetpack-fork-0.1.6 test/ignore_test.rb
sinatra-assetpack-0.1.6 test/ignore_test.rb
sinatra-assetpack-0.1.5 test/ignore_test.rb
sinatra-assetpack-0.1.4 test/ignore_test.rb
sinatra-assetpack-0.1.3 test/ignore_test.rb