Sha256: 97bed34e1f2a7e9217a31a20a4ff8d749306ecc18b5066a8b7a9a87be0deeb79
Contents?: true
Size: 655 Bytes
Versions: 1
Compression:
Stored size: 655 Bytes
Contents
require 'tdi/version' class TDI attr_accessor :passed alias :passed? :passed attr_accessor :skip, :pass, :warn, :fail def initialize @passed = true @skip = 0 @pass = 0 @warn = 0 @fail = 0 end def success(msg) # I like the seventies. printf('%-70s', msg) puts ' [ ' + 'PASS'.light_green + ' ]' @pass += 1 end def warning(msg) printf('%-70s', msg) puts ' [ ' + 'WARN'.light_yellow + ' ]' @warn += 1 end def failure(msg) printf('%-70s', msg) puts ' [ ' + 'FAIL'.light_red + ' ]' @passed = false @fail += 1 end def total @skip + @pass + @warn + @fail end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tdi-0.1.0 | lib/tdi.rb |