Module: Warden::Test::WardenHelpers
- Defined in:
- lib/warden/test/warden_helpers.rb
Instance Method Summary collapse
-
#_on_next_request ⇒ Object
private
A containter for the on_next_request items.
-
#on_next_request(&blk) ⇒ Object
Adds a block to be executed on the next request when the stack reaches warden.
-
#test_reset! ⇒ Object
resets wardens tests any blocks queued to execute will be removed.
Instance Method Details
#_on_next_request ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A containter for the on_next_request items.
23 24 25 26 |
# File 'lib/warden/test/warden_helpers.rb', line 23 def _on_next_request @_on_next_request ||= [] @_on_next_request end |
#on_next_request(&blk) ⇒ Object
Adds a block to be executed on the next request when the stack reaches warden. The warden proxy is yielded to the block
10 11 12 |
# File 'lib/warden/test/warden_helpers.rb', line 10 def on_next_request(&blk) _on_next_request << blk end |
#test_reset! ⇒ Object
resets wardens tests any blocks queued to execute will be removed
17 18 19 |
# File 'lib/warden/test/warden_helpers.rb', line 17 def test_reset! _on_next_request.clear end |