Class: FocusedController::TestRequest
- Inherits:
-
ActionDispatch::TestRequest
- Object
- ActionDispatch::TestRequest
- FocusedController::TestRequest
- Defined in:
- lib/focused_controller/test_helper.rb
Instance Method Summary collapse
- #cookie_jar ⇒ Object
- #flash ⇒ Object
-
#initialize(env = {}) ⇒ TestRequest
constructor
A new instance of TestRequest.
Constructor Details
#initialize(env = {}) ⇒ TestRequest
Returns a new instance of TestRequest.
17 18 19 20 |
# File 'lib/focused_controller/test_helper.rb', line 17 def initialize(env = {}) super self.session = HashWithIndifferentAccess.new end |
Instance Method Details
#cookie_jar ⇒ Object
22 23 24 |
# File 'lib/focused_controller/test_helper.rb', line 22 def @cookie_jar ||= ActionDispatch::Cookies::CookieJar.build(self) end |
#flash ⇒ Object
26 27 28 |
# File 'lib/focused_controller/test_helper.rb', line 26 def flash session['flash'] ||= ActionDispatch::Flash::FlashHash.new end |