Add an option for disabling colourful bacon output

If you don't want to see colours in your bacon output then export
`NO_PRY_COLORED_BACON` variable in your shell rc file and set it to
`true`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
This commit is contained in:
Kyrylo Silin 2012-10-18 05:36:50 +03:00
parent 98aa9a40aa
commit 8a135e7c85
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ require 'open4'
# TODO: Make own gem (assigned to rking)
module Bacon
COLORS = {'F' => 31, 'E' => 35, 'M' => 33, '.' => 32}
USE_COLOR = Pry::Helpers::BaseHelpers.use_ansi_codes?
USE_COLOR = !(ENV['NO_PRY_COLORED_BACON'] == 'true') && Pry::Helpers::BaseHelpers.use_ansi_codes?
module TestUnitOutput
def handle_requirement(description)