Sha256: c6a6fcd18a7b58928fdc6925a3c13596ef6ddf3a045ed0ff10e3930aebf3683e
Contents?: true
Size: 957 Bytes
Versions: 8
Compression:
Stored size: 957 Bytes
Contents
require "rack/test" require "sprockets" require "sprockets/image_compressor" describe "sprockets integration" do include Rack::Test::Methods let(:app) do Sprockets::Environment.new.tap do |env| Sprockets::ImageCompressor::Integration.setup env env.append_path "spec/fixtures" end end it "should compress pngs" do big_response = get "/largepng.png" small_response = get "/smallpng.png" big_response.headers["Content-Length"].should == small_response.headers["Content-Length"] big_response.body.should == small_response.body end it "should compress jpgs" do big_response = get "/largejpg.jpg" small_response = get "/smalljpg.jpg" big_response.headers["Content-Length"].should == small_response.headers["Content-Length"] big_response.body.should == small_response.body end it "should still serve text assets" do response = get "/test.css" response.status.should == 200 end end
Version data entries
8 entries across 8 versions & 2 rubygems