Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (25 sloc) 0.706 kB
require 'spec_helper'
describe "combing assets from query string" do
include Rack::Test::Methods
before(:each) do
@app = Rack::Combot.configure(:root => File.dirname(__FILE__) + '/public')
end
it "combines javascript" do
@app.call({
"QUERY_STRING" => "js1.js&js2.js"
}).must_equal([
200,
{"Content-Type" => "css/javascript"},
"function lorem() { return \"a\"; }\nfunction ipsum() { return \"b\"; }\n"
])
end
it "combines css" do
@app.call({
"QUERY_STRING" => "css1.css&css2.css"
}).must_equal([
200,
{"Content-Type" => "text/css"},
".lorem { background: blue; }\n#lipsum { border: 1px solid red }\n"
])
end
end
Jump to Line
Something went wrong with that request. Please try again.