Skip to content
This repository

make success/failure colors configurable #685

dchelimsky opened this Issue · 12 comments

8 participants

David Chelimsky Andy Lindeman Myron Marston Pete Hudgins Pat Maddox Kurt Nelson sdondley Patrick Brinich-Langlois
David Chelimsky

Red/green colorblind users would benefit from the ability to configure success/failure colors.

Andy Lindeman

This seems pretty straightforward. Thoughts on naming and interface?

RSpec.configure do |c|
  c.failure_color = :red
  c.success_color = :green

(and appropriate command line equivalents for ~/.rspec)?

David Chelimsky

I think we can support Symbols like :red and :green, but we should also support ascii color codes. Otherwise, this seems fine to me.

Andy Lindeman

Specified via integers?

RSpec.configuration.success_color = 34 # blue
David Chelimsky

Good idea.

Andy Lindeman

Cool. I think this could be a fun one to have a new employee work on. It might be a few weeks if that's OK.

Pete Hudgins

This would be invaluable for red/green colorblind people like me. Thanks for starting this!

Pat Maddox

I'd like to see symbols for common colors, and let people use an integer if they want something more specific.

Kurt Nelson

This is being implemented in #709.


To get color output to Mac's terminal, add a rspec configuration file named '.rspec' to the project's root and put the following single line in there:


David Chelimsky

@sdondley that's correct, however this issue is about configuring the specific colors that are used, not when color is used.

Myron Marston

Fixed by #709.

Myron Marston myronmarston closed this
Patrick Brinich-Langlois
patbl commented

Is there now a way of setting these options in .rspec, as alindeman suggested? I tried --failure-color yellow, but it didn't work. If there is, it seems not to be documented in the help file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.