module Warden::Test::WardenHelpers
Public Instance Methods
_on_next_request()
click to toggle source
A container for the #on_next_request items. @api private
# File lib/warden/test/warden_helpers.rb, line 36 def _on_next_request @_on_next_request ||= [] @_on_next_request end
asset_paths()
click to toggle source
Returns list of regex objects that match paths expected to be an asset @see Warden::Proxy#asset_request? @api public
# File lib/warden/test/warden_helpers.rb, line 9 def asset_paths @asset_paths ||= [/^\/assets\//] end
asset_paths=(*vals)
click to toggle source
Sets list of regex objects that match paths expected to be an asset @see Warden::Proxy#asset_request? @api public
# File lib/warden/test/warden_helpers.rb, line 16 def asset_paths=(*vals) @asset_paths = vals end
on_next_request(&blk)
click to toggle source
Adds a block to be executed on the next request when the stack reaches warden. The warden proxy is yielded to the block @api public
# File lib/warden/test/warden_helpers.rb, line 23 def on_next_request(&blk) _on_next_request << blk end
test_reset!()
click to toggle source
resets wardens tests any blocks queued to execute will be removed @api public
# File lib/warden/test/warden_helpers.rb, line 30 def test_reset! _on_next_request.clear end