# File lib/rspec/core/hooks.rb, line 111 def register_globals host, globals [:before, :after, :around].each do |position| process host, globals, position, :each next if position == :around # no around(:all) hooks process host, globals, position, :all end end
# File lib/rspec/core/hooks.rb, line 120 def process host, globals, position, scope globals[position][scope].each do |hook| unless host.ancestors.any? { |a| a.hooks[position][scope].include? hook } self[position][scope] << hook if scope == :each || hook.options_apply?(host) end end end