-
Notifications
You must be signed in to change notification settings - Fork 492
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
Colorize summarized RSpec results. #787
Conversation
da9e081
to
8187889
Compare
also: sorry for the long silence, this has been buried in my inbox :D |
# Summarize results from threads and colorize results based on failure and pending counts. | ||
# | ||
def summarize_results(results) | ||
sums = sum_up_results(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.
can move this under the return
can you add a test for the coloration happening ? |
All good! I honestly forgot about it myself. :) I took your suggested change and removed the rspec dependency. Added an entry to CHANGELOG as well. Will just add some tests and then pass it back to you. |
Quick Q: Are these CI tests supposed to be failing. Seem unrelated to my changes... |
trying to fix CI here #788 |
please rebase, at least ubuntu should be fixed |
Will squash and rebase... |
Odd, it's not letting me rebase and force push. I think because it includes your workflow commit:
Super strange. I'm going open a new PR and see if that helps. |
might be some security foobar having to do with the PR being older than the GA addition :( ... can you make a new branch and then pick this commit on top ? |
Damn, I can't even update my own fork's master from your master.
That's restrictive. I might be forced to create a new fork entirely. Super strange. |
15d5d9a
to
9359805
Compare
Okay, the only way I could update my fork's Then I was able to rebase my branch and force push. It's still showing your commit in this branch for some reason but 🤷♂️ . Take a look and let me know if you want or need anything else. Thanks. |
9359805
to
b0c3954
Compare
Kk, nevermind. I was able to fix the extra commit with another rebase. Strange times. Over to you... |
needs an update ? |
... could strip extra characters in all other tests with a regex |
only 1 commit here now :( |
b0c3954
to
c727898
Compare
Strange. Okay, fixed that and re-pushed. |
Tests still failing.... All tests pass on macOS. Does Ubuntu somehow deal with these differently? |
might handle tty differently, best to just stub tty? to be true ... or make it accept different results based on |
RSpec colorizes its results based on if there are any failures (red), pending (yellow) or none of the above (green). The method used to summarize the results from the various threads, `summarize_results` was not doing this colorization. This commit applies the same colorization that RSpec does but does not depend on RSpec::Core for colorization. It utilizes red for failure, yellow for pending and green for success. - Entry in `CHANGELOG.md` added. - Specs added for all major scenarios: - No failures or pending. - Just pending. - Failures and pending. - Just failures. Co-authored-by: Michael Grosser <michael@grosser.it>
c727898
to
548d659
Compare
Good call. 👍 |
thx, 3.4.0 🎉 |
Thanks for the help and shipping a new version so quickly! 🚢 |
RSpec colorizes its results based on if there are any failures (red), pending (orange) or none of the above (green).
The method used to summarize the results from the various threads,
summarize_results
was not doing this colorization.This commit applies the same colorization that RSpec does, utilizing RSpec::Core helpers to do so.
Before
After
Thank you for your contribution!
Checklist
master
(if not - rebase it).code introduces user-observable changes.