Skip to content

Commit

Permalink
Fix exit_status after Exception raised in before :all hook
Browse files Browse the repository at this point in the history
- Closes #301.
- Closes #302.
  • Loading branch information
dnurzynski authored and dchelimsky committed Feb 14, 2011
1 parent d832c61 commit 79273a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/rspec/core/example_group.rb
Expand Up @@ -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?
Expand Down
4 changes: 2 additions & 2 deletions spec/rspec/core/example_group_spec.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 79273a7

Please sign in to comment.