Created
September 24, 2012 10:13
-
-
Save fables-tales/3775318 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment