Class: Test::Reporters::Tapy

Inherits:
AbstractHash
  • Object
show all
Defined in:
lib/rubytest/format/tapy.rb

Overview

TAP-Y Reporter

Constant Summary collapse

REVISION =
5

Instance Method Summary collapse

Constructor Details

#initialize(runner) ⇒ Tapy

Returns a new instance of Tapy.



12
13
14
15
# File 'lib/rubytest/format/tapy.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/tapy.rb', line 25

def begin_case(test_case)
  puts super(test_case).to_yaml
end

#begin_suite(suite) ⇒ Object



18
19
20
21
22
# File 'lib/rubytest/format/tapy.rb', line 18

def begin_suite(suite)
  hash = super(suite)
  hash['rev'] = REVISION
  puts hash.to_json
end

#end_suite(suite) ⇒ Object



55
56
57
58
# File 'lib/rubytest/format/tapy.rb', line 55

def end_suite(suite)
  puts super(suite).to_yaml
  puts "..."
end

#error(test, exception) ⇒ Object



40
41
42
# File 'lib/rubytest/format/tapy.rb', line 40

def error(test, exception)
  puts super(test, exception).to_yaml
end

#fail(test, exception) ⇒ Object



35
36
37
# File 'lib/rubytest/format/tapy.rb', line 35

def fail(test, exception)
  puts super(test, exception).to_yaml
end

#omit(test, exception) ⇒ Object



50
51
52
# File 'lib/rubytest/format/tapy.rb', line 50

def omit(test, exception)
  puts super(test, exception).to_yaml
end

#pass(test) ⇒ Object

, backtrace=nil)



30
31
32
# File 'lib/rubytest/format/tapy.rb', line 30

def pass(test) #, backtrace=nil)
  puts super(test).to_yaml
end

#todo(test, exception) ⇒ Object



45
46
47
# File 'lib/rubytest/format/tapy.rb', line 45

def todo(test, exception)
  puts super(test, exception).to_yaml
end