Skip to content
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

Add colored output to the new test reporter. #22756

Merged
merged 1 commit into from Dec 23, 2015
Merged

Add colored output to the new test reporter. #22756

merged 1 commit into from Dec 23, 2015

Conversation

lucasmazza
Copy link
Contributor

This patch adds green/red/yellow ANSI color codes to Rails::TestUnitReporter and enables it by default (based on a CLI flag).

The output on iTerm's "Dark Background" preset:

If we want a programatic way to disable this, we could add a class attribute to be the fallback value in case the CLI flag isn't present, so developers can disable the colouring forever on their test_helper.rb (a counterpart to RSpec's .rspec config file) - let me know if makes sense to add this to this PR.

/cc @kaspth 😄

@maxehmookau
Copy link
Contributor

+1 I always wondered why Rails doesn't include this by default!

@rafaelfranca
Copy link
Member

LGTM

kaspth added a commit that referenced this pull request Dec 23, 2015
…tput

Add colored output to the new test reporter.
@kaspth kaspth merged commit 552e4e6 into rails:master Dec 23, 2015
@kaspth
Copy link
Contributor

kaspth commented Dec 23, 2015

Sweet, @lucasmazza 👏

@maxehmookau
Copy link
Contributor

👏

@gfvcastro
Copy link

@lucasmazza: Great. 👏

@arthurnn
Copy link
Member

🌈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants