Class: RSpec::Core::Hooks::AroundHook

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

Instance Method Details

#execute_with(example, procsy) ⇒ Object



372
373
374
375
376
377
# File 'lib/rspec/core/hooks.rb', line 372

def execute_with(example, procsy)
  example.instance_exec(procsy, &block)
  return if procsy.executed?
  Pending.mark_skipped!(example,
                        "#{hook_description} did not execute the example")
end

#hook_descriptionObject

:nocov:



385
386
387
# File 'lib/rspec/core/hooks.rb', line 385

def hook_description
  "around hook at #{Metadata.relative_path(block.source_location.join(':'))}"
end