Class: TapOut::Reporters::Tap
Overview
Constant Summary
Constants inherited
from Abstract
Abstract::INTERNALS
Instance Method Summary
collapse
Methods inherited from Abstract
#<<, #clean_backtrace, #code_snippet, #err, #finish_case, #finish_suite, #handle, inherited, #initialize, #note, #omit, #parse_source_location, #skip, #source, #tally, #test
Instance Method Details
#error(entry) ⇒ Object
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/tapout/reporters/tap.rb', line 53
def error(entry)
super(entry)
body = []
body << "ERROR #{entry['file']}:#{entry['line']}" body << "#{entry['message']}"
body << ""
body << code_snippet(entry)
body << ""
body = body.join("\n").gsub(/^/, ' # ')
puts "not ok #{entry['index']} - #{entry['label']}"
puts body
end
|
#fail(entry) ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/tapout/reporters/tap.rb', line 37
def fail(entry)
super(entry)
body = []
body << "FAIL #{entry['file']}:#{entry['line']}" body << "#{entry['message']}"
body << code_snippet(entry)
body = body.join("\n").gsub(/^/, ' # ')
puts "not ok #{entry['index']} - #{entry['label']}"
puts body
end
|
#pass(entry) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/tapout/reporters/tap.rb', line 28
def pass(entry)
super(entry)
puts "ok #{entry['index']} - #{entry['label']}"
end
|
#start_case(entry) ⇒ Object
18
19
20
|
# File 'lib/tapout/reporters/tap.rb', line 18
def start_case(entry)
end
|
#start_suite(entry) ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/tapout/reporters/tap.rb', line 9
def start_suite(entry)
@start = Time.now
@i = 0
puts "1..#{entry['count']}"
end
|