summaryrefslogtreecommitdiff
path: root/test/spec_multipart.rb
diff options
context:
space:
mode:
authorJian Weihang <tonytonyjan@gmail.com>2016-12-05 03:07:48 +0800
committerJian Weihang <tonytonyjan@gmail.com>2016-12-05 03:07:48 +0800
commit7449820d6d0145680d2375aa424a2bfa6cc7859e (patch)
tree268224bd7d7c1477c4bce569f4854f9ec64ac0e0 /test/spec_multipart.rb
parentb145f426364feaee5a434582d67fab4901a64f81 (diff)
downloadrack-7449820d6d0145680d2375aa424a2bfa6cc7859e.tar.gz
To support minitest 6 and prevent error ouput in minitest 5, use `must_be_nil` if expecting nil.
Diffstat (limited to 'test/spec_multipart.rb')
-rw-r--r--test/spec_multipart.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/spec_multipart.rb b/test/spec_multipart.rb
index 02b86bed..2f957d92 100644
--- a/test/spec_multipart.rb
+++ b/test/spec_multipart.rb
@@ -27,7 +27,7 @@ describe Rack::Multipart do
it "return nil if content type is not multipart" do
env = Rack::MockRequest.env_for("/",
"CONTENT_TYPE" => 'application/x-www-form-urlencoded')
- Rack::Multipart.parse_multipart(env).must_equal nil
+ Rack::Multipart.parse_multipart(env).must_be_nil
end
it "parse multipart content when content type present but filename is not" do
@@ -315,7 +315,7 @@ describe Rack::Multipart do
env = Rack::MockRequest.env_for("/", multipart_fixture(:none))
params = Rack::Multipart.parse_multipart(env)
params["submit-name"].must_equal "Larry"
- params["files"].must_equal nil
+ params["files"].must_be_nil
params.keys.wont_include "files"
end
@@ -563,7 +563,7 @@ Content-Type: image/jpeg\r
it "return nil if no UploadedFiles were used" do
data = Rack::Multipart.build_multipart("people" => [{"submit-name" => "Larry", "files" => "contents"}])
- data.must_equal nil
+ data.must_be_nil
end
it "raise ArgumentError if params is not a Hash" do