Class: TapOut::Reporters::Outline
Overview
Outline reporter.
TODO: This is still a work in progress.
Constant Summary
Constants inherited
from Abstract
Abstract::INTERNALS
Instance Method Summary
collapse
Methods inherited from Abstract
#<<, #clean_backtrace, #code_snippet, #exit_code, #finish_case, #handle, inherited, #initialize, #note, #omit, #parse_source_location, #skip, #source, #tally, #test
Instance Method Details
#err(entry) ⇒ Object
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tapout/reporters/outline.rb', line 37
def err(entry)
super(entry)
$stdout.puts "* " + entry['label'].ansi(:yellow) + " #{entry['source']}"
$stdout.puts
$stdout.puts " #{entry['exception']['message']}" $stdout.puts
$stdout.puts code_snippet(entry['exception'])
$stdout.puts
end
|
#fail(entry) ⇒ Object
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/tapout/reporters/outline.rb', line 26
def fail(entry)
super(entry)
$stdout.puts "* " + entry['label'].ansi(:red) + " #{entry['source']}"
$stdout.puts
$stdout.puts " #{entry['exception']['message']}"
$stdout.puts
$stdout.puts code_snippet(entry['exception'])
$stdout.puts
end
|
#finish_suite(entry) ⇒ Object
49
50
51
52
53
|
# File 'lib/tapout/reporters/outline.rb', line 49
def finish_suite(entry)
$stdout.print tally(entry)
$stdout.puts " [%0.4fs] " % [Time.now - @start_time]
end
|
#pass(entry) ⇒ Object
21
22
23
24
|
# File 'lib/tapout/reporters/outline.rb', line 21
def pass(entry)
super(entry)
$stdout.puts "* " + entry['label'].ansi(:green) + " #{entry['source']}"
end
|
#start_case(entry) ⇒ Object
17
18
19
|
# File 'lib/tapout/reporters/outline.rb', line 17
def start_case(entry)
$stdout.puts entry['label'].ansi(:bold)
end
|
#start_suite(entry) ⇒ Object
12
13
14
|
# File 'lib/tapout/reporters/outline.rb', line 12
def start_suite(entry)
@start_time = Time.now
end
|