aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/test_case.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 9c1f77ec91..639e24c995 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -395,25 +395,25 @@ module ActionController
end
alias xhr :xml_http_request
- def stringify_values(hash_or_array_or_value)
+ def paramify_values(hash_or_array_or_value)
case hash_or_array_or_value
when Hash
hash_or_array_or_value.each do |key, value|
- hash_or_array_or_value[key] = stringify_values(value)
+ hash_or_array_or_value[key] = paramify_values(value)
end
when Array
- hash_or_array_or_value.map {|i| stringify_values(i)}
- when Numeric, Symbol
- hash_or_array_or_value.to_s
- else
+ hash_or_array_or_value.map {|i| paramify_values(i)}
+ when Rack::Test::UploadedFile
hash_or_array_or_value
+ else
+ hash_or_array_or_value.to_param
end
end
def process(action, parameters = nil, session = nil, flash = nil, http_method = 'GET')
# Ensure that numbers and symbols passed as params are converted to
- # strings, as is the case when engaging rack.
- stringify_values(parameters)
+ # proper params, as is the case when engaging rack.
+ paramify_values(parameters)
# Sanity check for required instance variables so we can give an
# understandable error message.