Class: ActionView::TestCase::TestController
- Inherits:
-
ActionController::Base
- Object
- AbstractController::Base
- ActionController::Metal
- ActionController::Base
- ActionView::TestCase::TestController
- Includes:
- ActionDispatch::TestProcess
- Defined in:
- actionpack/lib/action_view/test_case.rb
Constant Summary
Constants inherited from ActionController::Base
ActionController::Base::MODULES
Class Attribute Summary collapse
-
.controller_path ⇒ Object
writeonly
Sets the attribute 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.
Instance Method Summary collapse
- #controller_path=(path) ⇒ Object
-
#initialize ⇒ TestController
constructor
A new instance of TestController.
Methods included from ActionDispatch::TestProcess
#assigns, #cookies, #fixture_file_upload, #flash, #redirect_to_url, #session
Methods inherited from ActionController::Base
Methods included from ActionController::Compatibility
#_handle_method_missing, #_normalize_options, #assign_shortcuts, #initialize_template_class, #method_for_action, #performed?, #render_to_body
Methods included from ActiveSupport::Concern
#append_features, extended, #included
Methods inherited from ActionController::Metal
action, call, #content_type, #content_type=, controller_name, #controller_name, #dispatch, #env, inherited, #location, #location=, middleware, #response_body=, #status, #status=, #to_a, #url_for, use
Methods inherited from AbstractController::Base
abstract!, #action_methods, action_methods, #available_action?, clear_action_methods!, controller_path, #controller_path, hidden_actions, internal_methods, method_added, #process
Methods included from ActiveSupport::DescendantsTracker
clear, descendants, #descendants, #direct_descendants, direct_descendants, #inherited
Methods included from ActiveSupport::Configurable
Constructor Details
#initialize ⇒ TestController
Returns a new instance of TestController.
24 25 26 27 28 29 30 31 32 |
# File 'actionpack/lib/action_view/test_case.rb', line 24 def initialize super self.class.controller_path = "" @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @request.env.delete('PATH_INFO') @params = {} end |
Class Attribute Details
.controller_path=(value) ⇒ Object (writeonly)
Sets the attribute controller_path
17 18 19 |
# File 'actionpack/lib/action_view/test_case.rb', line 17 def controller_path=(value) @controller_path = value end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params
14 15 16 |
# File 'actionpack/lib/action_view/test_case.rb', line 14 def params @params end |
#request ⇒ Object
Returns the value of attribute request
14 15 16 |
# File 'actionpack/lib/action_view/test_case.rb', line 14 def request @request end |
#response ⇒ Object
Returns the value of attribute response
14 15 16 |
# File 'actionpack/lib/action_view/test_case.rb', line 14 def response @response end |
Instance Method Details
#controller_path=(path) ⇒ Object
20 21 22 |
# File 'actionpack/lib/action_view/test_case.rb', line 20 def controller_path=(path) self.class.controller_path=(path) end |