Class: Teabag::Formatters::TapYFormatter
Instance Attribute Summary
#errors, #failures, #passes, #pendings, #total
Instance Method Summary
collapse
#exception, #initialize, #suppress_logs?
Instance Method Details
#error(error) ⇒ Object
44
45
46
|
# File 'lib/teabag/formatters/tap_y_formatter.rb', line 44
def error(error)
@errors << error
end
|
#result(result) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/teabag/formatters/tap_y_formatter.rb', line 30
def result(result)
log "type" => "final",
"time" => result.elapsed,
"counts" => {
"total" => @total,
"pass" => @passes.size,
"fail" => @failures.size,
"error" => @errors.size,
"omit" => 0,
"todo" => @pendings.size
}
super
end
|
#runner(result) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/teabag/formatters/tap_y_formatter.rb', line 8
def runner(result)
log "type" => "suite",
"start" => result.start,
"count" => result.total,
"seed" => 0,
"rev" => 4
end
|
#spec(result) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/teabag/formatters/tap_y_formatter.rb', line 22
def spec(result)
super
@result = result
return passing_spec if result.passing?
return pending_spec if result.pending?
failing_spec
end
|
#suite(result) ⇒ Object
16
17
18
19
20
|
# File 'lib/teabag/formatters/tap_y_formatter.rb', line 16
def suite(result)
log "type" => "case",
"label" => result.label,
"level" => result.level
end
|