module Kernel

Private Instance Methods

flunk(message = nil) click to toggle source
# File lib/cutest/kernel.rb, line 8
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
reporter() click to toggle source
# File lib/cutest/kernel.rb, line 4
def reporter
  cutest[:reporter] ||= Cutest::Reporter.new
end
skip(name = nil, &block) click to toggle source
# File lib/cutest/kernel.rb, line 20
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
success() click to toggle source
# File lib/cutest/kernel.rb, line 16
def success
  reporter.record(cutest[:test], 'successed')
end