make success/failure colors configurable #685

Closed
dchelimsky opened this Issue Sep 19, 2012 · 12 comments

Comments

Projects
None yet
8 participants
Owner

dchelimsky commented Sep 19, 2012

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

Contributor

alindeman commented Sep 19, 2012

This seems pretty straightforward. Thoughts on naming and interface?

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

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

Owner

dchelimsky commented Sep 19, 2012

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

Contributor

alindeman commented Sep 19, 2012

Specified via integers?

RSpec.configuration.success_color = 34 # blue
Owner

dchelimsky commented Sep 19, 2012

Good idea.

Contributor

alindeman commented Sep 19, 2012

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.

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

@ghost ghost assigned alindeman Sep 19, 2012

Contributor

patmaddox commented Sep 20, 2012

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

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:

--color

Owner

dchelimsky commented Oct 22, 2012

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

Owner

myronmarston commented Jan 1, 2013

Fixed by #709.

patbl commented Jun 13, 2013

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