From 8a135e7c8535c5b27c18bc9e19780041ec7f59f2 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Thu, 18 Oct 2012 05:36:50 +0300 Subject: [PATCH] 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 --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index d53be564..5ed78529 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -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)