-
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
The at_exit code is not run when using Minitest #1023
Comments
There's a bug with If you put Moreover, if you debug the same script (using If you invoke the handler on the stack frame, the report gets generated. So it seems that |
@akimd is there a special reason why you're calling Minitest.run directly? |
Hi, We have this script that serves as top-level for a library. It offers a bunch of options to run functions of the library, and to run selected tests. So some of its options are used to prepare the arguments passed to Cheers! |
@akimd your code works fine if you call |
Hi!
I might be asking a FAQ, but I have not found answers to my problems. I have read several times README though, and I don't think there's more documentation elsewhere.
First, I'd like to suggest that the doc should emphasize that not only must simplecov be required early, but also that (because of Ruby's Coverage) it cannot work on the file that loads it, it will only apply to files required or loaded afterwards.
A scaled down version of my setup is as follows.
I have a lib, reduced to
Then a main file, that, in its full version, includes option handling, starting the test suite, etc.
When run, I get:
and you can see that the at_exit code was not fired, and —no surprise— there's no
coverage/
created.If I comment out the
Minitest.run
, then I do getNow the at_exit is run, and I do get the
coverage/
dir.What do I need to do to get it to work?
Thanks a lot!
Versions
The text was updated successfully, but these errors were encountered: