Class: ActionView::TestCase::TestController
- Inherits:
-
ActionController::Base
- Object
- AbstractController::Base
- ActionController::Metal
- ActionController::Base
- ActionView::TestCase::TestController
- Includes:
- ActionDispatch::TestProcess
- Defined in:
- actionview/lib/action_view/test_case.rb
Constant Summary
Constants inherited from ActionController::Base
ActionController::Base::MODULES, ActionController::Base::PROTECTED_IVARS
Constants included from ActionController::ParamsWrapper
ActionController::ParamsWrapper::EXCLUDE_PARAMETERS
Constants included from ActiveSupport::Callbacks
ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES
Constants included from ActionController::DataStreaming
ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION, ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE
Constants included from ActionController::Rendering
ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY
Constants included from ActionController::RequestForgeryProtection
ActionController::RequestForgeryProtection::CSRF_TOKEN
Constants included from ActionController::Renderers
ActionController::Renderers::RENDERERS
Constants included from ActionController::Redirecting
ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX
Constants included from AbstractController::Rendering
AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES
Class Attribute Summary collapse
-
.controller_path ⇒ Object
Overrides AbstractController::Base#controller_path.
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#request ⇒ Object
Returns the value of attribute request.
-
#response ⇒ Object
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
- #controller_path=(path) ⇒ Object
-
#initialize ⇒ TestController
constructor
A new instance of TestController.
Methods included from ActionDispatch::TestProcess
#assigns, #cookies, #flash, #redirect_to_url, #session
Methods included from ActionDispatch::TestProcess::FixtureFile
Methods inherited from ActionController::Base
Methods included from ActiveSupport::Concern
#append_features, #class_methods, extended, #included, #prepend_features, #prepended
Methods included from ActionController::Instrumentation
#redirect_to, #render, #send_data, #send_file
Methods included from ActionController::Rescue
Methods included from ActiveSupport::Rescuable
#handler_for_rescue, #rescue_with_handler
Methods included from ActiveSupport::Callbacks
Methods included from ActionController::HttpAuthentication::Token::ControllerMethods
#authenticate_or_request_with_http_token, #authenticate_with_http_token, #request_http_token_authentication
Methods included from ActionController::HttpAuthentication::Digest::ControllerMethods
#authenticate_or_request_with_http_digest, #authenticate_with_http_digest, #request_http_digest_authentication
Methods included from ActionController::HttpAuthentication::Basic::ControllerMethods
#authenticate_or_request_with_http_basic, #authenticate_with_http_basic, #http_basic_authenticate_or_request_with, #request_http_basic_authentication
Methods included from ActionController::Rendering
#render, #render_to_body, #render_to_string
Methods included from AbstractController::Helpers
Methods included from AbstractController::Helpers::Resolution
#all_helpers_from_path, #helper_modules_from_paths, #modules_for_helpers
Methods included from ActionController::RequestForgeryProtection
#commit_csrf_token, #reset_csrf_token
Methods included from ActionController::FormBuilder
Methods included from ActionController::ImplicitRender
#default_render, #method_for_action
Methods included from ActionController::BasicImplicitRender
Methods included from ActionController::MimeResponds
Methods included from ActionController::ConditionalGet
#expires_in, #expires_now, #fresh_when, #http_cache_forever, #no_store, #stale?
Methods included from ActionController::Head
Methods included from ActionController::Renderers
#_render_to_body_with_renderer, _render_with_renderer_method_name, add, remove, #render_to_body
Methods included from Layouts
#_process_render_template_options, #action_has_layout?
Methods included from Rendering
#process, #render_to_body, #view_context, #view_context_class, #view_renderer
Methods included from ViewPaths
#_prefixes, #append_view_path, #details_for_lookup, #lookup_context, #prepend_view_path
Methods included from ActionController::Redirecting
_compute_redirect_to_location, #_compute_redirect_to_location, #redirect_back, #redirect_back_or_to, #redirect_to, #url_from
Methods included from ActionController::UrlFor
Methods included from AbstractController::UrlFor
Methods included from ActionDispatch::Routing::UrlFor
#full_url_for, #route_for, #url_for, #url_options
Methods included from ActionDispatch::Routing::PolymorphicRoutes
#polymorphic_path, #polymorphic_url
Methods included from ActionController::Helpers
Methods included from AbstractController::Translation
Methods included from AbstractController::Rendering
#render, #render_to_body, #render_to_string, #rendered_format, #view_assigns
Methods inherited from ActionController::Metal
action, action_encoding_template, #content_type, #content_type=, #controller_name, #dispatch, dispatch, #headers, #location, #location=, make_response!, #media_type, middleware, #performed?, #reset_session, #response_body=, #session, #set_request!, #set_response!, #status, #status=, #to_a, #url_for, use
Methods included from ActionController::Testing::Functional
#clear_instance_variables_between_requests, #recycle!
Methods inherited from AbstractController::Base
abstract!, action_methods, #action_methods, #action_name, #available_action?, clear_action_methods!, #controller_path, eager_load!, #formats, inherited, #inspect, internal_methods, method_added, #performed?, #process, #response_body, supports_path?
Methods included from ActiveSupport::DescendantsTracker
clear, #descendants, descendants, disable_clear!, reject!, subclasses
Methods included from ActiveSupport::Configurable
Constructor Details
#initialize ⇒ TestController
Returns a new instance of TestController.
34 35 36 37 38 39 40 41 42 |
# File 'actionview/lib/action_view/test_case.rb', line 34 def initialize super self.class.controller_path = "" @request = ActionController::TestRequest.create(self.class) @response = ActionDispatch::TestResponse.new @request.env.delete("PATH_INFO") @params = ActionController::Parameters.new end |
Class Attribute Details
.controller_path ⇒ Object
Overrides AbstractController::Base#controller_path
23 24 25 |
# File 'actionview/lib/action_view/test_case.rb', line 23 def controller_path @controller_path end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
19 20 21 |
# File 'actionview/lib/action_view/test_case.rb', line 19 def params @params end |
#request ⇒ Object
Returns the value of attribute request.
19 20 21 |
# File 'actionview/lib/action_view/test_case.rb', line 19 def request @request end |
#response ⇒ Object
Returns the value of attribute response.
19 20 21 |
# File 'actionview/lib/action_view/test_case.rb', line 19 def response @response end |
Class Method Details
.controller_name ⇒ Object
30 31 32 |
# File 'actionview/lib/action_view/test_case.rb', line 30 def self.controller_name "test" end |
Instance Method Details
#controller_path=(path) ⇒ Object
26 27 28 |
# File 'actionview/lib/action_view/test_case.rb', line 26 def controller_path=(path) self.class.controller_path = path end |