Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix Issue 301 - Rspec returns an exit status of 0 when an error is raised in the 'before :all' block #302

Closed
wants to merge 1 commit into from

1 participant

@dnurzynski

No description provided.

@dnurzynski

Fix exit_status after Exception raised in before :all hook

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
1  lib/rspec/core/example_group.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?
View
4 spec/rspec/core/example_group_spec.rb
@@ -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
Something went wrong with that request. Please try again.