Module: AllureRSpec::Hooks::OverrideHooksMethods
- Includes:
- RSpec::Core::Hooks
- Defined in:
- lib/allure-rspec/hooks.rb
Defined Under Namespace
Classes: OverridenHookCollections
Instance Method Summary
collapse
Instance Method Details
#hooks ⇒ Object
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/allure-rspec/hooks.rb', line 13
def hooks
if @__hooks.nil?
old = old_hooks
@__hooks ||= OverridenHookCollections.new(old.instance_variable_get(:@owner), old.instance_variable_get(:@data))
[:before, :after].each { |scope|
@__hooks[scope][:step] = HookCollection.new
}
end
@__hooks
end
|
#old_hooks ⇒ Object
11
|
# File 'lib/allure-rspec/hooks.rb', line 11
alias_method :old_hooks, :hooks
|