2009-10-01 14:26:46 -04:00
|
|
|
require File.join(File.dirname(__FILE__), "spec_helper")
|
|
|
|
|
|
|
|
base = ::Middleman::Base
|
|
|
|
base.set :root, File.join(File.dirname(__FILE__), "fixtures", "sample")
|
|
|
|
|
|
|
|
describe "Cache Buster Feature" do
|
|
|
|
before do
|
|
|
|
base.disable :cache_buster
|
2009-10-08 13:49:23 -04:00
|
|
|
base.init!(true)
|
2009-10-01 14:26:46 -04:00
|
|
|
@app = base.new
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should not append query string if off" do
|
|
|
|
@app.asset_url("stylesheets/static.css").should_not include("?")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "Cache Buster Feature" do
|
|
|
|
before do
|
|
|
|
base.enable :cache_buster
|
2009-10-08 13:49:23 -04:00
|
|
|
base.init!(true)
|
2009-10-01 14:26:46 -04:00
|
|
|
@app = base.new
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should append query string if on" do
|
|
|
|
@app.asset_url("stylesheets/static.css").should include("?")
|
|
|
|
end
|
|
|
|
end
|