Created
March 14, 2009 21:30
-
-
Save brynary/79191 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.dirname(__FILE__) + '/../spec_helper' | |
require "rack/test" | |
require "webrat" | |
describe Rack::Bug do | |
include Rack::Test::Methods | |
include Webrat::Matchers | |
def app | |
Rack::Bug::Middleware.new(SampleApp.new) | |
end | |
it "should return the correct Content-Length" do | |
response = get "/" | |
response["Content-Length"].should == response.body.join.size.to_s | |
end | |
it "should track the elapsed time" do | |
response = get "/" | |
response.should contain(/\d+\.\d+ms/) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment