Skip to content

Commit

Permalink
AroundProxy should use an ExampleGroup instance
Browse files Browse the repository at this point in the history
The example_block instance evaled in Example#run is instance evaled by a
ExampleGroup instance if no around eachs are given. We should do the same when
around eachs are given.
  • Loading branch information
benarmston committed Jun 15, 2010
1 parent 7910d7f commit f572842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/core/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def run(example_group_instance, reporter)
if @example_group_class.around_eachs.empty?
@example_group_instance.instance_eval(&example_block) unless pending
else
@example_group_class.around_eachs.first.call(AroundProxy.new(self, &example_block))
@example_group_class.around_eachs.first.call(AroundProxy.new(@example_group_instance, &example_block))
end
throw :pending_declared_in_example, false
end
Expand Down

0 comments on commit f572842

Please sign in to comment.