Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

even better

  • Loading branch information...
commit 71dc3c3c3381465059972d47b8302382cc4413a6 1 parent c26fefe
@dchelimsky dchelimsky authored
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) }
Please sign in to comment.
Something went wrong with that request. Please try again.