Permalink
Browse files

Fix exit_status after Exception raised in before :all hook

- Closes #301.
- Closes #302.
  • Loading branch information...
1 parent d832c61 commit 79273a74a83ea3210c7abc219d840da4f1fdb0d0 @dnurzynski dnurzynski committed with dchelimsky Feb 7, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −0 lib/rspec/core/example_group.rb
  2. +2 −2 spec/rspec/core/example_group_spec.rb
@@ -248,6 +248,7 @@ def self.fail_filtered_examples(exception, reporter)
child.fail_filtered_examples(exception, reporter)
reporter.example_group_finished(child)
end
+ false
end
def self.fail_fast?
@@ -387,7 +387,7 @@ module RSpec::Core
group = ExampleGroup.describe
group.before(:each) { raise "error in before each" }
example = group.example("equality") { 1.should == 2}
- group.run
+ group.run.should == false
example.metadata[:execution_result][:exception].message.should == "error in before each"
end
@@ -396,7 +396,7 @@ module RSpec::Core
group = ExampleGroup.describe
group.before(:all) { raise "error in before all" }
example = group.example("equality") { 1.should == 2}
- group.run
+ group.run.should == false
example.metadata.should_not be_nil
example.metadata[:execution_result].should_not be_nil

0 comments on commit 79273a7

Please sign in to comment.