Sha256: bb8674a9491bc2b0676a36fbd43b60fb06f5485a65cd5c41a360530812a96335
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
require File.expand_path('../test_helper', __FILE__) class PreprocTest < UnitTest test "preproc" do app.stubs(:clear_tilt_cache).returns(true) app.stubs(:development?).returns(false) get '/css/screen.css' assert body =~ %r{email.[a-f0-9]{32}.png} end test "preproc static files" do app.stubs(:clear_cache).returns(true) app.stubs(:development?).returns(false) get '/css/style.css' assert body =~ %r{background.[a-f0-9]{32}.jpg} end test "no cache-busting number for non-existent images" do app.stubs(:development?).returns(false) get '/css/style.css' assert body.include?('background: url(/images/404.png)') end test "preproc on minify" do app.stubs(:clear_cache).returns(true) app.stubs(:development?).returns(false) get '/css/application.css' assert body =~ %r{email.[a-f0-9]{32}.png} end test "embed" do app.stubs(:clear_cache).returns(true) app.stubs(:development?).returns(false) get '/css/screen.css' assert body =~ %r{data:image/png;base64,[A-Za-z0-9=/]{100,}} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sinatra-assetpack-0.2.1 | test/preproc_test.rb |
sinatra-assetpack-0.2.0 | test/preproc_test.rb |