test/spec_mock.rb in rack-1.2.8 vs test/spec_mock.rb in rack-1.3.0.beta

- old
+ new

@@ -165,11 +165,11 @@ env["CONTENT_TYPE"].should.equal "application/x-www-form-urlencoded" env["mock.postdata"].should.equal "foo[bar]=1" end should "accept params and build multipart encoded params for POST requests" do - files = Rack::Utils::Multipart::UploadedFile.new(File.join(File.dirname(__FILE__), "multipart", "file1.txt")) + files = Rack::Multipart::UploadedFile.new(File.join(File.dirname(__FILE__), "multipart", "file1.txt")) res = Rack::MockRequest.new(app).post("/foo", :params => { "submit-name" => "Larry", "files" => files }) env = YAML.load(res.body) env["REQUEST_METHOD"].should.equal "POST" env["QUERY_STRING"].should.equal "" env["PATH_INFO"].should.equal "/foo" @@ -177,11 +177,11 @@ env["mock.postdata"].length.should.equal 206 end should "behave valid according to the Rack spec" do lambda { - res = Rack::MockRequest.new(app). + Rack::MockRequest.new(app). get("https://bla.example.org:9292/meh/foo?bar", :lint => true) }.should.not.raise(Rack::Lint::LintError) end end @@ -212,10 +212,10 @@ res.should.include "Content-Type" 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 > 0 + res.content_length.should.not.equal 0 res.location.should.be.nil end should "provide access to the HTTP body" do res = Rack::MockRequest.new(app).get("")