mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Remove pending rack specifications until they are official
This commit is contained in:
@@ -278,9 +278,7 @@ module ActionController
|
||||
"HTTP_ACCEPT" => accept,
|
||||
"HTTP_COOKIE" => cookies.inject("") { |string, (name, value)|
|
||||
string << "#{name}=#{value}; "
|
||||
},
|
||||
|
||||
"rack.test" => true
|
||||
}
|
||||
}
|
||||
env = ActionDispatch::Test::MockRequest.env_for(@path, opts)
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ EOM
|
||||
alias_method :params, :parameters
|
||||
|
||||
def path_parameters=(parameters) #:nodoc:
|
||||
@env["rack.routing_args"] = parameters
|
||||
@env["action_dispatch.request.path_parameters"] = parameters
|
||||
@symbolized_path_parameters = @parameters = nil
|
||||
end
|
||||
|
||||
@@ -413,7 +413,7 @@ EOM
|
||||
#
|
||||
# See <tt>symbolized_path_parameters</tt> for symbolized keys.
|
||||
def path_parameters
|
||||
@env["rack.routing_args"] ||= {}
|
||||
@env["action_dispatch.request.path_parameters"] ||= {}
|
||||
end
|
||||
|
||||
# The request body is an IO input stream. If the RAW_POST_DATA environment
|
||||
|
||||
@@ -11,7 +11,7 @@ module ActionDispatch
|
||||
@app.call(env)
|
||||
rescue Exception => exception
|
||||
# Reraise exception in test environment
|
||||
if env["rack.test"]
|
||||
if defined?(Rails) && Rails.test?
|
||||
raise exception
|
||||
else
|
||||
failsafe_response(exception)
|
||||
|
||||
Reference in New Issue
Block a user