Show your testing pride!

Methods
M
N
P
Constants
ESC = "\e["
 
NND = "#{ESC}0m"
 
Attributes
[R] io
Class Public methods
new(io)
# File ../ruby/lib/minitest/pride.rb, line 18
def initialize io
  @io = io
  # stolen from /System/Library/Perl/5.10.0/Term/ANSIColor.pm
  # also reference http://en.wikipedia.org/wiki/ANSI_escape_code
  @colors ||= (31..36).to_a
  @size   = @colors.size
  @index  = 0
  # io.sync = true
end
Instance Public methods
method_missing(msg, *args)
# File ../ruby/lib/minitest/pride.rb, line 59
def method_missing msg, *args
  io.send(msg, *args)
end
pride(string)
# File ../ruby/lib/minitest/pride.rb, line 52
def pride string
  string = "*" if string == "."
  c = @colors[@index % @size]
  @index += 1
  "#{ESC}#{c}m#{string}#{NND}"
end
print(o)
# File ../ruby/lib/minitest/pride.rb, line 28
def print o
  case o
  when "." then
    io.print pride o
  when "E", "F" then
    io.print "#{ESC}41m#{ESC}37m#{o}#{NND}"
  else
    io.print o
  end
end
puts(*o)
# File ../ruby/lib/minitest/pride.rb, line 39
def puts(*o)
  o.map! { |s|
    s.sub(/Finished tests/) {
      @index = 0
      'Fabulous tests'.split(//).map { |c|
        pride(c)
      }.join
    }
  }

  super
end