Class: RSpec::Core::Hooks::BeforeHook

Inherits:
Hook
  • Object
show all
Defined in:
lib/rspec/core/hooks.rb

Instance Attribute Summary

Attributes inherited from Hook

#block, #options

Instance Method Summary (collapse)

Methods inherited from Hook

#initialize, #options_apply?

Constructor Details

This class inherits a constructor from RSpec::Core::Hooks::Hook

Instance Method Details

- (Object) display_name

24
25
26
# File 'lib/rspec/core/hooks.rb', line 24
def display_name
  "before hook"
end

- (Object) run(example)

20
21
22
# File 'lib/rspec/core/hooks.rb', line 20
def run(example)
  example.instance_eval(&block)
end