Sha256: 1e8819f8725c03eded168477fe39008751170ea3dfb8b5164b74106d28700dde
Contents?: true
Size: 597 Bytes
Versions: 8
Compression:
Stored size: 597 Bytes
Contents
# -*- ruby -*- # special thanks to Pat Eyler, Sean Carley, and Rob Sanheim # and to Peter Havens for rspec patches module Autotest::RedGreen BAR = "=" * 78 REDCODE = 31 GREENCODE = 32 Autotest.add_hook :ran_command do |at| green = case at.results.last when /^.* (\d+) failures, (\d+) errors$/ # Test::Unit ($1 == "0" and $2 == "0") when /^\d+\s+examples?,\s+(\d+)\s+failure/ # RSpec ($1 == "0") end code = green ? GREENCODE : REDCODE puts "\e[#{ code }m#{ BAR }\e[0m\n\n" unless green.nil? end end
Version data entries
8 entries across 8 versions & 3 rubygems