2009-10-27 21:13:19 -04:00
|
|
|
require File.join(File.dirname(__FILE__), "spec_helper")
|
|
|
|
|
|
|
|
base = ::Middleman::Base
|
|
|
|
base.set :root, File.join(File.dirname(__FILE__), "fixtures", "sample")
|
|
|
|
|
|
|
|
describe "Relative Assets Feature" do
|
|
|
|
it "should not contain ../ if off" do
|
|
|
|
base.disable :relative_assets
|
|
|
|
browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
|
|
|
|
browser.get("/stylesheets/relative_assets.css")
|
|
|
|
browser.last_response.body.should_not include("../")
|
|
|
|
end
|
2009-11-03 15:34:57 -05:00
|
|
|
|
2009-10-27 21:13:19 -04:00
|
|
|
it "should contain ../ if on" do
|
|
|
|
base.enable :relative_assets
|
|
|
|
browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
|
|
|
|
browser.get("/stylesheets/relative_assets.css")
|
|
|
|
browser.last_response.body.should include("../")
|
|
|
|
end
|
|
|
|
end
|