-
Notifications
You must be signed in to change notification settings - Fork 24
Fix test runner and output #850
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
Conversation
Now that this gem is on Minitest 6, we are able to use its own runner for running tests. So, I created a binstub for the `minitest` command exported from the `minitest` gem and renamed it to `bin/test`. This way, we can continue to use the (almost) same command line interface for running tests, but we also get running tests by line number too 🎉 Additionally, since Minitest no longer automatically registers plugins, we need to fix up how we register Minitest reporters that we were registering.
| require "minitest/autorun" | ||
| require "minitest/reporters" | ||
| require "minitest/minitest_reporter_plugin" | ||
| Minitest.register_plugin(:minitest_reporter) |
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.
Do we still need the reporter?
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.
Yes! This is for registering Minitest Reporters' plugin to Minitest (which used to be automatic previously), but we still need to set the reporter, etc after that.
In the next release of minitest-reporters this should be done automatically inside the library. For now, we need to do it explicitly.
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 mean, do we still need the reporter itself?
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.
Ah, maybe not. Without the reporter, all you get is the dots for each test. I thought you wanted to keep the spec style reporting.
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.
No it's me being confused, since I saw just dots in the output before this PR, but indeed the output is much better with the reporter enabled 👍
Though, iirc it's a bit buggy with parallelism like in Tapioca?
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 haven't seen this one be that buggy, tbh, we can always change it if it is.
Now that this gem is on Minitest 6, we are able to use its own runner for running tests. So, I created a binstub for the
minitestcommand exported from theminitestgem and renamed it tobin/test. This way, we can continue to use the (almost) same command line interface for running tests, but we also get running tests by line number too 🎉Additionally, since Minitest no longer automatically registers plugins, we need to fix up how we register Minitest reporters that we were registering.