Sha256: 00f0502a83ae85b54c6b17a902f81daf1de79f62aaa49a739b77e6620f2b4729

Contents?: true

Size: 733 Bytes

Versions: 17

Compression:

Stored size: 733 Bytes

Contents

require 'rack/test'
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
  it "should not append query string if off" do
    base.disable :cache_buster
    browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
    browser.get("/stylesheets/relative_assets.css")
    browser.last_response.body.should_not include("?")
  end
  
  it "should append query string if on" do
    base.enable :cache_buster
    browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
    browser.get("/stylesheets/relative_assets.css")
    browser.last_response.body.should include("?")
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
middleman-0.10.13 spec/cache_buster_spec.rb
middleman-0.10.12 spec/cache_buster_spec.rb
middleman-0.10.11 spec/cache_buster_spec.rb
middleman-0.10.10 spec/cache_buster_spec.rb
middleman-0.10.9 spec/cache_buster_spec.rb
middleman-0.10.8 spec/cache_buster_spec.rb
middleman-0.10.7 spec/cache_buster_spec.rb
middleman-0.10.6 spec/cache_buster_spec.rb
middleman-0.10.5 spec/cache_buster_spec.rb
middleman-0.10.4 spec/cache_buster_spec.rb
middleman-0.10.3 spec/cache_buster_spec.rb
middleman-0.10.2 spec/cache_buster_spec.rb
middleman-0.10.1 spec/cache_buster_spec.rb
middleman-0.10.0 spec/cache_buster_spec.rb
middleman-0.9.23 spec/cache_buster_spec.rb
middleman-0.9.22 spec/cache_buster_spec.rb
middleman-0.9.21 spec/cache_buster_spec.rb