Class: ActionController::TestResponse

Inherits:
AbstractResponse show all
Includes:
TestResponseBehavior
Defined in:
lib/action_controller/test_process.rb

Overview

Integration test methods such as ActionController::Integration::Session#get and ActionController::Integration::Session#post return objects of class TestResponse, which represent the HTTP response results of the requested controller actions.

See AbstractResponse for more information on controller response objects.

Constant Summary

Constants inherited from AbstractResponse

AbstractResponse::DEFAULT_HEADERS

Instance Attribute Summary

Attributes inherited from AbstractResponse

#assigns, #body, #cookies, #headers, #layout, #redirected_to, #redirected_to_method_params, #request, #session, #template

Instance Method Summary collapse

Methods included from TestResponseBehavior

#binary_content, #code, #cookies, #error?, #flash, #has_flash?, #has_flash_object?, #has_flash_with_contents?, #has_session_object?, #has_template_object?, #message, #missing?, #redirect?, #redirect_url, #redirect_url_match?, #rendered_template, #response_code, #success?, #template_objects

Methods inherited from AbstractResponse

#assign_default_content_type_and_charset!, #charset, #charset=, #content_type, #content_type=, #etag, #etag=, #etag?, #initialize, #last_modified, #last_modified=, #last_modified?, #location, #location=, #prepare!, #redirect, #sending_file?, #status, #status=

Constructor Details

This class inherits a constructor from ActionController::AbstractResponse

Instance Method Details

#recycle!Object


288
289
290
291
# File 'lib/action_controller/test_process.rb', line 288

def recycle!
  headers.delete('ETag')
  headers.delete('Last-Modified')
end