public
Created

  • Download Gist
gistfile1.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
diff --git a/lib/rspec/core/example_group.rb b/lib/rspec/core/example_group.rb
index 6b167d0..56afa77 100644
--- a/lib/rspec/core/example_group.rb
+++ b/lib/rspec/core/example_group.rb
@@ -309,9 +309,12 @@ module RSpec
# @private
def self.run_before_all_hooks(example_group_instance)
return if descendant_filtered_examples.empty?
- assign_before_all_ivars(superclass.before_all_ivars, example_group_instance)
- run_hook(:before, :all, example_group_instance)
- store_before_all_ivars(example_group_instance)
+ begin
+ assign_before_all_ivars(superclass.before_all_ivars, example_group_instance)
+ run_hook(:before, :all, example_group_instance)
+ ensure
+ store_before_all_ivars(example_group_instance)
+ end
end
# @private

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.