From 3e6fc7c49e36222e08f99b8d3e6d0d667896577c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 2 Sep 2016 12:25:29 +0200 Subject: [PATCH] Fix test suite for Rack 2.x compatiblity. --- spec/rack/test/utils_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/rack/test/utils_spec.rb b/spec/rack/test/utils_spec.rb index 0a0f0ec4..d94a249f 100644 --- a/spec/rack/test/utils_spec.rb +++ b/spec/rack/test/utils_spec.rb @@ -66,7 +66,7 @@ :input => StringIO.new(data) } env = Rack::MockRequest.env_for("/", options) - params = Rack::Utils::Multipart.parse_multipart(env) + params = Rack::Multipart.parse_multipart(env) check expect(params["submit-name"]).to eq("Larry") check expect(params["files"][:filename]).to eq("foo.txt") expect(params["files"][:tempfile].read).to eq("bar\n") @@ -82,7 +82,7 @@ :input => StringIO.new(data) } env = Rack::MockRequest.env_for("/", options) - params = Rack::Utils::Multipart.parse_multipart(env) + params = Rack::Multipart.parse_multipart(env) check expect(params["submit-name"]).to eq("Larry") check expect(params["files"][0][:filename]).to eq("foo.txt") @@ -102,7 +102,7 @@ :input => StringIO.new(data) } env = Rack::MockRequest.env_for("/", options) - params = Rack::Utils::Multipart.parse_multipart(env) + params = Rack::Multipart.parse_multipart(env) check expect(params["people"][0]["submit-name"]).to eq("Larry") check expect(params["people"][0]["files"][:filename]).to eq("foo.txt") expect(params["people"][0]["files"][:tempfile].read).to eq("bar\n") @@ -119,7 +119,7 @@ :input => StringIO.new(data) } env = Rack::MockRequest.env_for("/", options) - params = Rack::Utils::Multipart.parse_multipart(env) + params = Rack::Multipart.parse_multipart(env) check expect(params["files"][:filename]).to eq("foo.txt") expect(params["files"][:tempfile].read).to eq("bar\n") check expect(params["foo"]).to eq([{"id" => "1", "name" => "Dave"}, {"id" => "2", "name" => "Steve"}]) @@ -137,7 +137,7 @@ :input => StringIO.new(data) } env = Rack::MockRequest.env_for("/", options) - params = Rack::Utils::Multipart.parse_multipart(env) + params = Rack::Multipart.parse_multipart(env) check expect(params["files"][:filename]).to eq("foo.txt") expect(params["files"][:tempfile].read).to eq("bar\n") check expect(params["foo"]).to eq({"bar" => [{"id" => "1", "name" => "Dave"}, @@ -155,7 +155,7 @@ :input => StringIO.new(data) } env = Rack::MockRequest.env_for("/", options) - params = Rack::Utils::Multipart.parse_multipart(env) + params = Rack::Multipart.parse_multipart(env) check expect(params["files"][0][:filename]).to eq("foo.txt") expect(params["files"][0][:tempfile].read).to eq("bar\n") check expect(params["foo"][0]).to eq("1") @@ -173,7 +173,7 @@ :input => StringIO.new(data) } env = Rack::MockRequest.env_for("/", options) - params = Rack::Utils::Multipart.parse_multipart(env) + params = Rack::Multipart.parse_multipart(env) check expect(params["foo"][0]["id"]).to eq("1") check expect(params["foo"][0]["data"][:filename]).to eq("foo.txt") expect(params["foo"][0]["data"][:tempfile].read).to eq("bar\n")