Class: Test::Reporters::Tapj
- Inherits:
-
AbstractHash
- Object
- AbstractHash
- Test::Reporters::Tapj
- Defined in:
- lib/rubytest/format/tapj.rb
Overview
TAP-J Reporter
Constant Summary collapse
- REVISION =
5
Instance Method Summary collapse
- #begin_case(test_case) ⇒ Object
- #begin_suite(suite) ⇒ Object
- #end_suite(suite) ⇒ Object
- #error(test, exception) ⇒ Object
- #fail(test, exception) ⇒ Object
-
#initialize(runner) ⇒ Tapj
constructor
A new instance of Tapj.
-
#pass(test) ⇒ Object
, backtrace=nil).
- #todo(test, exception) ⇒ Object
Constructor Details
#initialize(runner) ⇒ Tapj
Returns a new instance of Tapj.
12 13 14 15 |
# File 'lib/rubytest/format/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/format/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/format/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/format/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/format/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/format/tapj.rb', line 35 def fail(test, exception) puts super(test, exception).to_json end |
#pass(test) ⇒ Object
, backtrace=nil)
30 31 32 |
# File 'lib/rubytest/format/tapj.rb', line 30 def pass(test) #, backtrace=nil) puts super(test).to_json end |
#todo(test, exception) ⇒ Object
45 46 47 |
# File 'lib/rubytest/format/tapj.rb', line 45 def todo(test, exception) puts super(test, exception).to_json end |