2009-10-01 20:26:46 +02: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
|
2009-10-15 23:24:00 +02:00
|
|
|
it "should not append query string if off" do
|
2009-10-01 20:26:46 +02:00
|
|
|
base.disable :cache_buster
|
2009-10-15 23:24:00 +02:00
|
|
|
base.init!(true, true)
|
|
|
|
base.asset_url("stylesheets/static.css").should_not include("?")
|
2009-10-01 20:26:46 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
it "should append query string if on" do
|
2009-10-15 23:24:00 +02:00
|
|
|
base.enable :cache_buster
|
|
|
|
base.init!(true, true)
|
|
|
|
base.asset_url("stylesheets/static.css").should include("?")
|
2009-10-01 20:26:46 +02:00
|
|
|
end
|
|
|
|
end
|