Sha256: 901a2b0d26931fbc139fbee442ab4653b8cf29514507f65e57d0c288edac081d

Contents?: true

Size: 657 Bytes

Versions: 26

Compression:

Stored size: 657 Bytes

Contents

# encoding: utf-8

module Warden

  module Test
    module WardenHelpers
      # 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
      def on_next_request(&blk)
        _on_next_request << blk
      end

      # resets wardens tests
      # any blocks queued to execute will be removed
      # @api public
      def test_reset!
        _on_next_request.clear
      end

      # A containter for the on_next_request items.
      # @api private
      def _on_next_request
        @_on_next_request ||= []
        @_on_next_request
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
devise_sociable-0.1.0 vendor/bundle/gems/warden-1.0.6/lib/warden/test/warden_helpers.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/test/warden_helpers.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/test/warden_helpers.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/test/warden_helpers.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/test/warden_helpers.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/test/warden_helpers.rb
warden-1.1.1 lib/warden/test/warden_helpers.rb
warden-1.1.0 lib/warden/test/warden_helpers.rb
warden-1.0.6 lib/warden/test/warden_helpers.rb
warden-1.0.5 lib/warden/test/warden_helpers.rb
warden-1.0.4 lib/warden/test/warden_helpers.rb
warden-1.0.3 lib/warden/test/warden_helpers.rb
warden-1.0.2 lib/warden/test/warden_helpers.rb
warden-1.0.1 lib/warden/test/warden_helpers.rb
warden-1.0.0 lib/warden/test/warden_helpers.rb
warden-0.10.7 lib/warden/test/warden_helpers.rb
warden-0.10.6 lib/warden/test/warden_helpers.rb
warden-0.10.5 lib/warden/test/warden_helpers.rb
warden-0.10.4 lib/warden/test/warden_helpers.rb
warden-0.10.3 lib/warden/test/warden_helpers.rb