From a8b75c480fc9774252f5976dcf1a614079822e56 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 2 May 2009 14:57:40 -0500 Subject: Functional test runner finalizes response just like the integration test runner. In both runners, the @response object will now behave the same. Some functional tests will need to be updated if they are relying on preprocessed data on the response. --- actionpack/lib/action_controller/testing/process.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/testing/process.rb b/actionpack/lib/action_controller/testing/process.rb index f62d18a1f9..b44ec2f94b 100644 --- a/actionpack/lib/action_controller/testing/process.rb +++ b/actionpack/lib/action_controller/testing/process.rb @@ -132,7 +132,10 @@ module ActionController #:nodoc: Base.class_eval { include ProcessWithTest } unless Base < ProcessWithTest - @controller.process(@request, @response) + response = Rack::MockResponse.new(*@controller.process(@request, ActionDispatch::Response.new).to_a) + @response.request, @response.template = @request, @controller.template + @response.status, @response.headers, @response.body = response.status, response.headers, response.body + @response end def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil) -- cgit v1.2.3