-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Use SuppressedSummaryReporter and Rails::TestUnitReporter only if needed #31901
Conversation
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @kamipo (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review. Please see the contribution instructions for more information. |
PS: I don't find the information about which branch to target for this kind of pull request. I am sorry if it's wrong, I can change it 👍. |
Thanks for your Pull Request. |
The purpose is to make possible to replace reporters. If I understand well, Rails doesn't check and add unconditionally these two reporters. This is what I would like to change. The other way may be to use an |
Thanks. We are considering adding the option to skip Rails' custom Minitest reporter. Probably I think that adding this option will satisfy your request. |
+1. We want to replace the original reporters; if they're not there, then we have nothing to do. I suspect I already know the answer, but is it possible/practical to test this? |
One way for testing this is to move/extract the replacing logic to a method that take |
I added some tests 👍 |
One job doesn't pass https://travis-ci.org/rails/rails/jobs/341311470
I don't think that I can do anything 😄 |
Can you add a changelog entry and squash your commits? |
@rafaelfranca I have added a changelog entry and squashed my commits 👍 |
Use SuppressedSummaryReporter and Rails::TestUnitReporter only if needed
Use SuppressedSummaryReporter and Rails::TestUnitReporter only if needed
I'd be nice to have this fix backported to Rails 5.0. |
@andreynering Is there a process or a rule for backporting this kind of fix? |
@Kevinrob Only the maintainers could tell if a backport for this would be accepted. (In theory, Rails 5.0 is not maintained anymore). If so, I'd also be open to work on this. Do you know which version this patch was initially released for? v5.1? v5.2? |
Rails 5.2 I thing |
Summary
Rails Minitest plugin should add
SuppressedSummaryReporter
only for replacingSummaryReporter
andRails::TestUnitReporter
forProgressReporter
.Currently, the plugin always add these two reporters without checking if it's necessary.
For example, kern/minitest-reporters can remove all reporters and set custom ones defined by the configuration.
Currently,
rails
will re-add reporters without checks.