module RSpec::Core::Formatters::ConsoleCodes
def console_code_for(code_or_symbol)
def console_code_for(code_or_symbol) if VT100_CODE_VALUES.has_key?(code_or_symbol) code_or_symbol else VT100_CODES.fetch(code_or_symbol) do console_code_for(:white) end end end
def wrap(text, code_or_symbol)
def wrap(text, code_or_symbol) if RSpec.configuration.color_enabled? "\e[#{console_code_for(code_or_symbol)}m#{text}\e[0m" else text end end