Skip to content

Commit

Permalink
potential fix for issue simplecov-ruby#262, all tests still pass and …
Browse files Browse the repository at this point in the history
…error no longer appears in guard
  • Loading branch information
jordanrs committed Jan 6, 2014
1 parent a38915d commit 79b7e65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/simplecov/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@
# otherwise set a non-zero status representing termination by some other exception
# (see github issue 41)
@exit_status = $!.is_a?(SystemExit) ? $!.status : SimpleCov::ExitCodes::EXCEPTION
else
# Store the exit status of the test run since it goes away after calling the at_exit proc...
@exit_status = SimpleCov::ExitCodes::SUCCESS

end

SimpleCov.at_exit.call
Expand Down Expand Up @@ -77,7 +76,7 @@
SimpleCov::LastRun.write(:result => {:covered_percent => covered_percent})
end

exit @exit_status # Force exit with stored status (see github issue #5)
exit @exit_status if @exit_status # Force exit with stored status (see github issue #5)
end

# Autoload config from ~/.simplecov if present
Expand Down

0 comments on commit 79b7e65

Please sign in to comment.