class Oktest::VerboseReporter
Constants
- LABELS
; [!6o9nw] reports topic name and spec desc.
Public Instance Methods
enter_scope(scope)
click to toggle source
# File lib/oktest.rb, line 1886 def enter_scope(scope) puts "## #{scope.filename}" end
enter_spec(spec, depth)
click to toggle source
# File lib/oktest.rb, line 1899 def enter_spec(spec, depth) if $stdout.tty? str = "#{' ' * (depth - 1)}#{spec._prefix} [ ] #{spec.desc}" print Util.strfold(str, 79) $stdout.flush end end
enter_topic(topic, depth)
click to toggle source
Calls superclass method
Oktest::BaseReporter#enter_topic
# File lib/oktest.rb, line 1890 def enter_topic(topic, depth) super puts "#{' ' * (depth - 1)}#{topic._prefix} #{Color.topic(topic.target)}" end
exit_spec(spec, depth, status, error, parent)
click to toggle source
Calls superclass method
Oktest::BaseReporter#exit_spec
# File lib/oktest.rb, line 1907 def exit_spec(spec, depth, status, error, parent) super if $stdout.tty? print "\r" # clear line $stdout.flush end label = Color.status(status, LABELS[status] || '???') msg = "#{' ' * (depth - 1)}- [#{label}] #{spec.desc}" msg << " " << Color.reason("(reason: #{error.message})") if status == :SKIP puts msg end
exit_topic(topic, depth)
click to toggle source
# File lib/oktest.rb, line 1895 def exit_topic(topic, depth) print_exceptions() end