class Oktest::BaseReporter

Constants

CHARS
LABELS

Attributes

counts[R]

Public Class Methods

new() click to toggle source
# File lib/oktest.rb, line 1743
def initialize()
  @exceptions = []
  @counts = {}
end

Public Instance Methods

enter_all(runner) click to toggle source
# File lib/oktest.rb, line 1750
def enter_all(runner)
  #; [!pq3ia] initalizes counter by zero.
  reset_counts()
  @start_at = Time.now
end
enter_scope(scope) click to toggle source
# File lib/oktest.rb, line 1762
def enter_scope(scope)
end
enter_spec(spec, depth) click to toggle source
# File lib/oktest.rb, line 1774
def enter_spec(spec, depth)
end
enter_topic(topic, depth) click to toggle source
# File lib/oktest.rb, line 1768
def enter_topic(topic, depth)
end
exit_all(runner) click to toggle source
# File lib/oktest.rb, line 1756
def exit_all(runner)
  #; [!wjp7u] prints footer with elapsed time.
  elapsed = Time.now - @start_at
  puts footer(elapsed)
end
exit_scope(scope) click to toggle source
# File lib/oktest.rb, line 1765
def exit_scope(scope)
end
exit_spec(spec, depth, status, exc, parent) click to toggle source
# File lib/oktest.rb, line 1777
def exit_spec(spec, depth, status, exc, parent)
  #; [!r6yge] increments counter according to status.
  @counts[status] += 1
  #; [!nupb4] keeps exception info when status is FAIL or ERROR.
  @exceptions << [spec, status, exc, parent] if status == :FAIL || status == :ERROR
end
exit_topic(topic, depth) click to toggle source
# File lib/oktest.rb, line 1771
def exit_topic(topic, depth)
end

Protected Instance Methods

print_exc(spec, status, exc, topic) click to toggle source
print_exc_backtrace(exc, status) click to toggle source
print_exc_message(exc, status) click to toggle source
print_exceptions() click to toggle source
reset_counts() click to toggle source
# File lib/oktest.rb, line 1786
def reset_counts()
  #; [!oc29s] clears counters to zero.
  STATUSES.each {|sym| @counts[sym] = 0 }
end
spec_path(spec, topic) click to toggle source
# File lib/oktest.rb, line 1868
def spec_path(spec, topic)
  #; [!dv6fu] returns path string from top topic to current spec.
  arr = [spec.desc]
  while topic && topic.topic?
    arr << topic.target.to_s if topic.target
    topic = topic.parent
  end
  return arr.reverse.join(" > ")
end