Method: RSpec::Core::Configuration#around
- Defined in:
- lib/rspec/core/configuration.rb
#around(scope = nil, *meta, &block) ⇒ void
Registers block as an around hook.
See Hooks#around for full around hook docs.
2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 |
# File 'lib/rspec/core/configuration.rb', line 2086 def around(scope=nil, *, &block) # defeat Ruby 2.5 lazy proc allocation to ensure # the methods below are passed the same proc instances # so `Hook` equality is preserved. For more info, see: # https://bugs.ruby-lang.org/issues/14045#note-5 block.__id__ add_hook_to_existing_matching_groups(, scope) { |g| g.around(scope, *, &block) } super(scope, *, &block) end |