test/spec_rack_mock.rb in rack-0.1.0 vs test/spec_rack_mock.rb in rack-0.2.0
- old
+ new
@@ -124,16 +124,18 @@
res.headers["Content-Type"].should.equal "text/yaml"
res.original_headers["Content-Type"].should.equal "text/yaml"
res["Content-Type"].should.equal "text/yaml"
res.content_type.should.equal "text/yaml"
res.content_length.should.be.nil
+ res.location.should.be.nil
end
specify "should provide access to the HTTP body" do
res = Rack::MockRequest.new(app).get("")
res.body.should =~ /rack/
res.should =~ /rack/
res.should.match(/rack/)
+ res.should.satisfy { |r| r.match(/rack/) }
end
specify "should provide access to the Rack errors" do
res = Rack::MockRequest.new(app).get("/?error=foo", :lint => true)
res.should.be.ok