Sha256: 0beb7d35a84dc1818f557c69de366e6cdcadcd2f81ad576d45ae5c6411c47bdf
Contents?: true
Size: 593 Bytes
Versions: 8
Compression:
Stored size: 593 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 body.size > 0 assert !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
8 entries across 8 versions & 3 rubygems