@private
# File lib/rspec/core/hooks.rb, line 468 def around_example_hooks_for(example, initial_procsy=nil) AroundHookCollection.new(FlatMap.flat_map(@owner.parent_groups) do |a| a.hooks[:around][:example] end).for(example, initial_procsy) end
# File lib/rspec/core/hooks.rb, line 474 def register(prepend_or_append, hook, *args, &block) scope, options = scope_and_options_from(*args) self[hook][scope].__send__(prepend_or_append, HOOK_TYPES[hook][scope].new(block, options)) end
# File lib/rspec/core/hooks.rb, line 459 def register_globals(host, globals) process(host, globals, :before, :example) process(host, globals, :after, :example) process(host, globals, :around, :example) process(host, globals, :before, :context) process(host, globals, :after, :context) end
@private
Runs all of the blocks stored with the hook in the context of the example. If no example is provided, just calls the hook directly.
# File lib/rspec/core/hooks.rb, line 483 def run(hook, scope, example_or_group, initial_procsy=nil) return if RSpec.configuration.dry_run? find_hook(hook, scope, example_or_group, initial_procsy).run end
Generated with the Darkfish Rdoc Generator 2.