module RSpec::Core::Hooks

def before(*args, &block)

Other tags:
    Note: - The `:suite` scope is only supported for hooks registered on
    Note: - The `:example` and `:context` scopes are also available as

Other tags:
    Example: before(:context) declared in an {ExampleGroup} -
    Example: before(:example) declared in an {ExampleGroup} -

Other tags:
    See: Configuration -
    See: SharedExampleGroup -
    See: SharedContext -
    See: ExampleGroup -
    See: #around -
    See: #after -

Parameters:
  • conditions (Hash) --
  • conditions (Array, Hash) -- constrains this hook to
  • scope (Symbol) -- `:example`, `:context`, or `:suite`
  • scope (Symbol) -- `:example`, `:context`, or `:suite`

Overloads:
  • before(conditions, &block)
  • before(scope, *conditions, &block)
  • before(scope, &block)
  • before(&block)

Other tags:
    Api: - public
def before(*args, &block)
  hooks.register :append, :before, *args, &block
end