Sha256: ff3f45e072617fc96ceafd514c422b0d9d0e48fc03c937873508663fa89b4fbd
Contents?: true
Size: 826 Bytes
Versions: 18
Compression:
Stored size: 826 Bytes
Contents
require File.expand_path('../test_helper', __FILE__) class TemplateCacheTest < UnitTest class App < UnitTest::App register Sinatra::AssetPack set :reload_templates, false assets do |a| a.css :a, '/a.css', %w[/css/screen.css] end end def app() App; end test "cache dynamic files when reload templates is false" do App.any_instance.expects(:asset_filter_css).times(1).returns "OK" 10.times { get '/css/screen.css' } end test "cache static css files when reload templates is false" do App.any_instance.expects(:asset_filter_css).times(1).returns "OK" 10.times { get '/css/style.css' } end test "cache packages when reload templates is false" do Sinatra::AssetPack::Package.any_instance.expects(:minify).times(1).returns "OK" 10.times { get '/a.css' } end end
Version data entries
18 entries across 18 versions & 3 rubygems