class Oktobertest::Test

Public Class Methods

new(name = nil, &block) click to toggle source
# File lib/oktobertest.rb, line 95
def initialize(name = nil, &block)
  @name, @block = name.to_s, block
end

Public Instance Methods

run() click to toggle source
# File lib/oktobertest.rb, line 99
def run
  instance_eval &@block
  print '.'
rescue TestFailed => error
  print 'F'
rescue TestSkipped => error
  print 'S'
rescue StandardError => error
  print 'E'
ensure
  Oktobertest.errors << error unless error.nil?
end
run?() click to toggle source
# File lib/oktobertest.rb, line 112
def run?
  !ENV['T'] || ENV['T'] == @name
end