Class: ActionView::TestCase::TestController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ActionView::TestCase::TestController
- Includes:
- ActionDispatch::TestProcess
- Defined in:
- lib/action_view/test_case.rb
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.
Instance Method Summary collapse
- #controller_path=(path) ⇒ Object
-
#initialize ⇒ TestController
constructor
A new instance of TestController.
Constructor Details
#initialize ⇒ TestController
Returns a new instance of TestController.
27 28 29 30 31 32 33 34 35 |
# File 'lib/action_view/test_case.rb', line 27 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
20 21 22 |
# File 'lib/action_view/test_case.rb', line 20 def controller_path @controller_path end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
16 17 18 |
# File 'lib/action_view/test_case.rb', line 16 def params @params end |
#request ⇒ Object
Returns the value of attribute request.
16 17 18 |
# File 'lib/action_view/test_case.rb', line 16 def request @request end |
#response ⇒ Object
Returns the value of attribute response.
16 17 18 |
# File 'lib/action_view/test_case.rb', line 16 def response @response end |
Instance Method Details
#controller_path=(path) ⇒ Object
23 24 25 |
# File 'lib/action_view/test_case.rb', line 23 def controller_path=(path) self.class.controller_path = path end |