From aa843a3210dfc3d55ab3bfb5553fa7a793f6adc2 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Tue, 5 Apr 2016 10:43:17 +0200 Subject: [PATCH] allow passing a third parameter to force multipart --- lib/rack/test/utils.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rack/test/utils.rb b/lib/rack/test/utils.rb index 00e2618e..4c91be7d 100644 --- a/lib/rack/test/utils.rb +++ b/lib/rack/test/utils.rb @@ -26,13 +26,12 @@ def build_nested_query(value, prefix = nil) module_function :build_nested_query - def build_multipart(params, first = true) + def build_multipart(params, first = true, multipart = false) if first unless params.is_a?(Hash) raise ArgumentError, "value must be a Hash" end - multipart = false query = lambda { |value| case value when Array