Class: TapOut::Reporters::Dotprogress
- Inherits:
-
Abstract
- Object
- Abstract
- TapOut::Reporters::Dotprogress
show all
- Defined in:
- lib/tapout/reporters/dotprogress.rb
Overview
Traditional dot progress reporter.
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, #start_case, #tally, #test
Instance Method Details
#err(entry) ⇒ Object
29
30
31
32
33
|
# File 'lib/tapout/reporters/dotprogress.rb', line 29
def err(entry)
$stdout.print 'E'.ansi(:yellow)
$stdout.flush
super(entry)
end
|
#fail(entry) ⇒ Object
22
23
24
25
26
|
# File 'lib/tapout/reporters/dotprogress.rb', line 22
def fail(entry)
$stdout.print 'F'.ansi(:red)
$stdout.flush
super(entry)
end
|
#finish_suite(entry) ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/tapout/reporters/dotprogress.rb', line 36
def finish_suite(entry)
$stdout.puts "\n\n"
i = 1
@failed.each do |e|
$stdout.puts "#{i}. " + (e['label']).ansi(:red)
$stdout.puts
$stdout.puts " #{e['exception']['message']}"
$stdout.puts " #{e['exception']['file']}:#{e['exception']['line']}" $stdout.puts code_snippet(e['exception'])
$stdout.puts
i += 1
end
@raised.each do |e|
$stdout.puts "#{i}. " + (e['label']).ansi(:yellow)
$stdout.puts
$stdout.puts " #{e['exception']['message']}"
$stdout.puts " #{e['exception']['file']}:#{e['exception']['line']}" $stdout.puts code_snippet(e['exception'])
$stdout.puts
i += 1
end
$stdout.puts "Finished in #{Time.now - @start_time}s"
$stdout.puts tally(entry)
end
|
#pass(entry) ⇒ Object
15
16
17
18
19
|
# File 'lib/tapout/reporters/dotprogress.rb', line 15
def pass(entry)
$stdout.print '.'
$stdout.flush
super(entry)
end
|
#start_suite(entry) ⇒ Object
9
10
11
12
|
# File 'lib/tapout/reporters/dotprogress.rb', line 9
def start_suite(entry)
@start_time = Time.now
$stdout.puts "Started\n"
end
|