module Test::Drive::Formatter
Constants
- COLORS
Public Instance Methods
print_result(result)
click to toggle source
# File lib/test/drive/formatter.rb, line 17 def print_result(result) if result == 'SUCCESS' || result == 'UNSTABLE' puts rainbowize '*********************************************************************************************************************************************' puts rainbowize Artii::Base.new(font: 'slant').asciify('T E S T - D R I V E N .') puts rainbowize '*********************************************************************************************************************************************' else puts Rainbow(Artii::Base.new.asciify result).red end end
rainbowize(string)
click to toggle source
# File lib/test/drive/formatter.rb, line 28 def rainbowize(string) rainbow_string = '' string.length.times { |i| rainbow_string << Rainbow(string[i]).color(COLORS[i % COLORS.length]) } rainbow_string end