class Oktest::SimpleReporter
Public Class Methods
new()
click to toggle source
; [!jxa1b] reports topics and progress.
Calls superclass method
Oktest::BaseReporter::new
# File lib/oktest.rb, line 1925 def initialize() super @_nl = true end
Public Instance Methods
enter_scope(scope)
click to toggle source
# File lib/oktest.rb, line 1944 def enter_scope(scope) _nl() puts "## #{scope.filename}" end
enter_topic(topic, depth)
click to toggle source
Calls superclass method
Oktest::BaseReporter#enter_topic
# File lib/oktest.rb, line 1954 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)
click to toggle source
# File lib/oktest.rb, line 1949 def exit_scope(scope) _nl() print_exceptions() end
exit_spec(spec, depth, status, error, parent)
click to toggle source
Calls superclass method
Oktest::BaseReporter#exit_spec
# File lib/oktest.rb, line 1970 def exit_spec(spec, depth, status, error, parent) super print Color.status(status, CHARS[status] || '?') $stdout.flush _nl_off() end
exit_topic(topic, depth)
click to toggle source
Calls superclass method
Oktest::BaseReporter#exit_topic
# File lib/oktest.rb, line 1963 def exit_topic(topic, depth) super return if topic._prefix == '-' _nl() print_exceptions() end
order_policy()
click to toggle source
# File lib/oktest.rb, line 1930 def order_policy() :spec_first end
Private Instance Methods
_nl()
click to toggle source
# File lib/oktest.rb, line 1934 def _nl() (puts(); @_nl = true) unless @_nl end
_nl_off()
click to toggle source
# File lib/oktest.rb, line 1939 def _nl_off() @_nl = false end