diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-04-30 23:31:20 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-04-30 23:46:34 -0500 |
commit | 1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a (patch) | |
tree | 4ff5acd5af83ae7b771f863505fd52a838a46a27 /actionpack/lib/action_controller/testing/process.rb | |
parent | dc9f53b05b650614520086ae780ca5e58efe65b1 (diff) | |
download | rails-1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a.tar.gz rails-1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a.tar.bz2 rails-1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a.zip |
Move TestRequest#query_parameters into AD TestRequest
Diffstat (limited to 'actionpack/lib/action_controller/testing/process.rb')
-rw-r--r-- | actionpack/lib/action_controller/testing/process.rb | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/actionpack/lib/action_controller/testing/process.rb b/actionpack/lib/action_controller/testing/process.rb index d397bc0283..786dc67e2e 100644 --- a/actionpack/lib/action_controller/testing/process.rb +++ b/actionpack/lib/action_controller/testing/process.rb @@ -2,20 +2,13 @@ require 'rack/session/abstract/id' module ActionController #:nodoc: class TestRequest < ActionDispatch::TestRequest #:nodoc: - attr_accessor :query_parameters - def initialize(env = {}) super - @query_parameters = {} self.session = TestSession.new self.session_options = TestSession::DEFAULT_OPTIONS.merge(:id => ActiveSupport::SecureRandom.hex(16)) end - def action=(action_name) - query_parameters.update({ "action" => action_name }) - end - def assign_parameters(controller_path, action, parameters) parameters = parameters.symbolize_keys.merge(:controller => controller_path, :action => action) extra_keys = ActionController::Routing::Routes.extra_keys(parameters) @@ -47,9 +40,8 @@ module ActionController #:nodoc: end def recycle! - @env.delete_if { |k, v| k =~ /^action_dispatch\.request/ } - self.query_parameters = {} - @headers = nil + @env.delete_if { |k, v| k =~ /^(action_dispatch|rack)\.request/ } + @env['action_dispatch.request.query_parameters'] = {} end end @@ -132,8 +124,6 @@ module ActionController #:nodoc: @html_document = nil @request.request_method = http_method - @request.action = action.to_s - parameters ||= {} @request.assign_parameters(@controller.class.controller_path, action.to_s, parameters) |