Sha256: 27e7a8794553f2f2090466dba6d20a7bd770a97f2a878ca0726d4f14fe349eb1
Contents?: true
Size: 683 Bytes
Versions: 1
Compression:
Stored size: 683 Bytes
Contents
module Kernel private def reporter cutest[:reporter] ||= Cutest::Reporter.new end def flunk(message = nil) backtrace = caller trace = backtrace.select { |line| line !~ Cutest::FILTER } exception = Cutest::AssertionFailed.new(message) exception.set_backtrace(trace) reporter.record(cutest[:test], 'failed', exception) end def success reporter.record(cutest[:test], 'successed') end def skip(name = nil, &block) backtrace = caller trace = backtrace.select { |line| line !~ Cutest::FILTER } exception = Cutest::AssertionFailed.new() exception.set_backtrace(trace) reporter.record(name, 'skipped', exception) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cutest-reporter-0.1.0 | lib/cutest/kernel.rb |