Fix test runner and output - #850
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.
Do we still need the reporter?
There was a problem hiding this comment.
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.
I mean, do we still need the reporter itself?
There was a problem hiding this comment.
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.
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.
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.