Class: Test::Reporters::Tapj
Overview
Constant Summary
collapse
- REVISION =
5
Instance Attribute Summary
Attributes inherited from Abstract
#runner
Instance Method Summary
collapse
#begin_test, #end_case, #end_test, #skip_test
Methods inherited from Abstract
#begin_test, #end_case, #end_test, inherited, registry, #skip_case, #skip_test
Constructor Details
#initialize(runner) ⇒ Tapj
Returns a new instance of Tapj.
12
13
14
15
|
# File 'lib/rubytest/reporters/tapj.rb', line 12
def initialize(runner)
require 'json'
super(runner)
end
|
Instance Method Details
#begin_case(test_case) ⇒ Object
25
26
27
|
# File 'lib/rubytest/reporters/tapj.rb', line 25
def begin_case(test_case)
puts super(test_case).to_json
end
|
#begin_suite(suite) ⇒ Object
18
19
20
21
22
|
# File 'lib/rubytest/reporters/tapj.rb', line 18
def begin_suite(suite)
hash = super(suite)
hash['rev'] = REVISION
puts hash.to_json
end
|
#end_suite(suite) ⇒ Object
50
51
52
53
|
# File 'lib/rubytest/reporters/tapj.rb', line 50
def end_suite(suite)
puts super(suite).to_json
puts "..."
end
|
#error(test, exception) ⇒ Object
40
41
42
|
# File 'lib/rubytest/reporters/tapj.rb', line 40
def error(test, exception)
puts super(test, exception).to_json
end
|
#fail(test, exception) ⇒ Object
35
36
37
|
# File 'lib/rubytest/reporters/tapj.rb', line 35
def fail(test, exception)
puts super(test, exception).to_json
end
|
#pass(test) ⇒ Object
30
31
32
|
# File 'lib/rubytest/reporters/tapj.rb', line 30
def pass(test) puts super(test).to_json
end
|
#todo(test, exception) ⇒ Object
45
46
47
|
# File 'lib/rubytest/reporters/tapj.rb', line 45
def todo(test, exception)
puts super(test, exception).to_json
end
|