module RSpec::Core::Hooks

def before(*args, &block)

Other tags:
    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 (Hash) --
  • scope (Symbol) -- `:example`, `:context`, or `:suite` (defaults to `:example`)
  • scope (Symbol) -- `:example`, `:context`, or `:suite` (defaults to `:example`)

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