method
recycle!
recycle!()
public
Hide source
# File actionpack/lib/action_controller/test_case.rb, line 251 def recycle! @formats = nil @env.delete_if { |k, v| k =~ /^(action_dispatch|rack)\.request/ } @env.delete_if { |k, v| k =~ /^action_dispatch\.rescue/ } @method = @request_method = nil @fullpath = @ip = @remote_ip = @protocol = nil @env['action_dispatch.request.query_parameters'] = {} @set_cookies ||= {} @set_cookies.update(Hash[cookie_jar.instance_variable_get("@set_cookies").map{ |k,o| [k,o[:value]] }]) deleted_cookies = cookie_jar.instance_variable_get("@delete_cookies") @set_cookies.reject!{ |k,v| deleted_cookies.include?(k) } cookie_jar.update(rack_cookies) cookie_jar.update(cookies) cookie_jar.update(@set_cookies) cookie_jar.recycle! end