Browse files

even better

  • Loading branch information...
1 parent c26fefe commit 71dc3c3c3381465059972d47b8302382cc4413a6 @dchelimsky dchelimsky committed Jun 29, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rspec/core/example.rb
View
4 lib/rspec/core/example.rb
@@ -73,8 +73,8 @@ def wrapped_example
end
def around_hooks(example_group_class, example_group_instance, &wrapped_example)
- hooks = RSpec.configuration.hooks[:around][:each].dup
- hooks.push example_group_class.ancestors.reverse.map{|a| a.hooks[:around][:each]}
+ hooks = RSpec.configuration.hooks[:around][:each] +
+ example_group_class.ancestors.reverse.map{|a| a.hooks[:around][:each]}
hooks.flatten.reverse.inject(wrapped_example) do |wrapper, hook|
def wrapper.run; call; end
lambda { example_group_instance.instance_exec(wrapper, &hook) }

0 comments on commit 71dc3c3

Please sign in to comment.