diff --git a/lib/rspec/core/example.rb b/lib/rspec/core/example.rb index 8580b55aa..a78f7a6f3 100644 --- a/lib/rspec/core/example.rb +++ b/lib/rspec/core/example.rb @@ -93,11 +93,11 @@ def with_pending_capture end end - def with_around_hooks + def with_around_hooks(&block) if around_hooks.empty? yield else - @example_group_class.eval_around_eachs(self, Procsy.new(metadata)).call + @example_group_class.eval_around_eachs(self, Procsy.new(metadata, &block)).call end end