Sha256: 9511ef0f6c728f4c4501f5199f56db1ba604a2cb25b350218b81ee43a76205a9
Contents?: true
Size: 696 Bytes
Versions: 8
Compression:
Stored size: 696 Bytes
Contents
module Minitest module Reporters module ANSI module Code def self.color? return false if ENV['MINITEST_REPORTERS_MONO'] color_terminal = ENV['TERM'].to_s.downcase.include?("color") $stdout.tty? || color_terminal end if color? require 'ansi/code' include ::ANSI::Code extend ::ANSI::Code else def black(s = nil) block_given? ? yield : s end %w[red green yellow blue magenta cyan white].each do |color| alias_method color, :black end extend self end end end end end
Version data entries
8 entries across 8 versions & 2 rubygems