-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method to shutdown and collect results before at_exit #731
Conversation
Remove explicit JSON dependency
…esult to false which will prevent from running again at_exit
# Conflicts: # simplecov.gemspec
@colszowka I can add a test for this new method, wanted to check if you were ok with the general premise first though |
👋 Hi there, sorry for the delay I've been rather busy :) What's you use case if I might ask? It's rather specific. To understand if there'd be a better way to do this/accomplish this I need to understand the use case. |
SimpleCov.set_exit_exception | ||
exit_status = SimpleCov.exit_status_from_exception | ||
SimpleCov.result.format! | ||
exit_status = SimpleCov.process_result(SimpleCov.result, exit_status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think SimpleCov
should be self
here so no need to address it directly imo. Also I think the last assignment and return aren't needed :)
@@ -53,6 +53,17 @@ def start(profile = nil, &block) | |||
Coverage.start | |||
end | |||
|
|||
# | |||
# Method added by NREL to shutdown SimpleCov and collect results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is NREL?
@macumber Hi there! 👋 Any plans on picking this up or detailing your use case for this? Would be really helpful! :) |
We are using simplecov as part of a testing framework and have need to collect results before
at_exit
. The newend_now
method allows the user to get results beforeat_exit
.