From e136fbd7fa3286006766b59485a0e3348c776e5c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 2 Jul 2012 15:14:55 -0700 Subject: push the cookie writing stuff out of the controller merging cookies is responsibility of the test runner --- actionpack/lib/action_controller/metal/testing.rb | 25 ++--------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'actionpack/lib/action_controller/metal/testing.rb') diff --git a/actionpack/lib/action_controller/metal/testing.rb b/actionpack/lib/action_controller/metal/testing.rb index 838da3322d..f998efb6e9 100644 --- a/actionpack/lib/action_controller/metal/testing.rb +++ b/actionpack/lib/action_controller/metal/testing.rb @@ -4,33 +4,12 @@ module ActionController include RackDelegation - # This gets included on the second request. We only want to modify this - # behavior on the second request. Ugh. - module Recycled # :nodoc: - def set_response!(request) - end - - def process(name) - ret = super - if cookies = @_request.env['action_dispatch.cookies'] - cookies.write(@_response) - end - @_response.prepare! - ret - end - - def recycled? - true - end - end - - def recycled? # :nodoc: - false + def set_response!(request) + super unless @_response end def recycle! @_url_options = nil - extend Recycled unless recycled? end # TODO : Rewrite tests using controller.headers= to use Rack env -- cgit v1.2.3