class L::Test::Reporter
Public Class Methods
new(opt = {})
click to toggle source
# File lib/rub/l/test.rb, line 111 def initialize(opt = {}) @passed = true @io = opt[:io] || $stdout end
Public Instance Methods
passed?()
click to toggle source
Did this run pass?
# File lib/rub/l/test.rb, line 144 def passed? @passed end
record(r)
click to toggle source
Record a result and output the Runnable#result_code. Stores the result of the run if the run did not pass.
# File lib/rub/l/test.rb, line 125 def record(r) pres = if r.skipped? "\e[34;1mSKIP\e[0m" elsif r.passed? "\e[32;1mPASS\e[0m" else "\e[31;1mFAIL\e[0m" end @io.puts "[#{pres}] #{r.class}##{r.name}" end
report()
click to toggle source
Outputs the summary of the run.
# File lib/rub/l/test.rb, line 139 def report end
start()
click to toggle source
Starts reporting on the run.
# File lib/rub/l/test.rb, line 119 def start end