You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rubygem-rack-test/rubygem-rack-test-0.6.3-Fix...

80 lines
3.5 KiB

From d3e32e0ef2539a6e6c79022ee63807317074fb4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
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 3b27767..4557c5b 100644
--- a/spec/rack/test/utils_spec.rb
+++ b/spec/rack/test/utils_spec.rb
@@ -61,7 +61,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["submit-name"].should == "Larry"
check params["files"][:filename].should == "foo.txt"
params["files"][:tempfile].read.should == "bar\n"
@@ -77,7 +77,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["submit-name"].should == "Larry"
check params["files"][0][:filename].should == "foo.txt"
@@ -97,7 +97,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["people"][0]["submit-name"].should == "Larry"
check params["people"][0]["files"][:filename].should == "foo.txt"
params["people"][0]["files"][:tempfile].read.should == "bar\n"
@@ -114,7 +114,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["files"][:filename].should == "foo.txt"
params["files"][:tempfile].read.should == "bar\n"
check params["foo"].should == [{"id" => "1", "name" => "Dave"}, {"id" => "2", "name" => "Steve"}]
@@ -132,7 +132,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["files"][:filename].should == "foo.txt"
params["files"][:tempfile].read.should == "bar\n"
check params["foo"].should == {"bar" => [{"id" => "1", "name" => "Dave"},
@@ -150,7 +150,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["files"][0][:filename].should == "foo.txt"
params["files"][0][:tempfile].read.should == "bar\n"
check params["foo"][0].should == "1"
@@ -168,7 +168,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["foo"][0]["id"].should == "1"
check params["foo"][0]["data"][:filename].should == "foo.txt"
params["foo"][0]["data"][:tempfile].read.should == "bar\n"
--
2.9.3