From 2455f96a6e33ab0d233fd98c7e3313131b4dbda2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 30 Jun 2005 16:16:12 +0000 Subject: Fixed mr recycle! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/test_process.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index f1762e507f..71c012c357 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -249,6 +249,8 @@ module Test private # execute the request and set/volley the response def process(action, parameters = nil, session = nil, flash = nil) + @request.recycle! + # Sanity check for required instance variables so we can give an understandable error message. %w(controller request response).each do |iv_name| assert_not_nil instance_variable_get("@#{iv_name}"), "@#{iv_name} is nil: make sure you set it in your test's setup method." @@ -265,7 +267,6 @@ module Test @request.session["flash"] = ActionController::Flash::FlashHash.new.update(flash) if flash build_request_uri(action, parameters) @controller.process(@request, @response) - # @request.recycle! end # execute the request simulating a specific http method and set/volley the response -- cgit v1.2.3