Class: Oktest::SimpleReporter

Inherits:
BaseReporter show all
Defined in:
lib/oktest.rb

Constant Summary

Constants inherited from BaseReporter

BaseReporter::CHARS, BaseReporter::LABELS

Instance Attribute Summary

Attributes inherited from BaseReporter

#counts

Instance Method Summary collapse

Methods inherited from BaseReporter

#enter_all, #enter_spec, #exit_all

Methods inherited from Reporter

#counts, #enter_all, #enter_spec, #exit_all

Constructor Details

#initializeSimpleReporter

; [!jxa1b] reports topics and progress.



1957
1958
1959
1960
# File 'lib/oktest.rb', line 1957

def initialize()
  super
  @_nl = true
end

Instance Method Details

#enter_scope(scope) ⇒ Object



1976
1977
1978
1979
# File 'lib/oktest.rb', line 1976

def enter_scope(scope)
  _nl()
  puts "## #{scope.filename}"
end

#enter_topic(topic, depth) ⇒ Object



1986
1987
1988
1989
1990
1991
1992
1993
# File 'lib/oktest.rb', line 1986

def enter_topic(topic, depth)
  super
  return if topic._prefix == '-'
  _nl()
  print "#{'  ' * (depth - 1)}#{topic._prefix} #{Color.topic(topic.target)}: "
  $stdout.flush()
  _nl_off()
end

#exit_scope(scope) ⇒ Object



1981
1982
1983
1984
# File 'lib/oktest.rb', line 1981

def exit_scope(scope)
  _nl()
  print_exceptions()
end

#exit_spec(spec, depth, status, error, parent) ⇒ Object



2002
2003
2004
2005
2006
2007
# File 'lib/oktest.rb', line 2002

def exit_spec(spec, depth, status, error, parent)
  super
  print Color.status(status, CHARS[status] || '?')
  $stdout.flush
  _nl_off()
end

#exit_topic(topic, depth) ⇒ Object



1995
1996
1997
1998
1999
2000
# File 'lib/oktest.rb', line 1995

def exit_topic(topic, depth)
  super
  return if topic._prefix == '-'
  _nl()
  print_exceptions()
end

#order_policyObject



1962
1963
1964
# File 'lib/oktest.rb', line 1962

def order_policy()
  :spec_first
end