class MiniTest::RG

def puts o=nil

def puts o=nil
  return io.puts if o.nil?
  if o =~ /(\d+) failures, (\d+) errors/
    if $1 != '0' || $2 != '0'
      io.puts "\e[31m#{o}\e[0m"
    else
      io.puts "\e[32m#{o}\e[0m"
    end
  else
    io.puts o
  end
end