Remove pending rack specifications until they are official

This commit is contained in:
Joshua Peek
2009-04-25 13:41:30 -05:00
parent dd2ed32418
commit 044794fc9e
3 changed files with 4 additions and 6 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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)