Class: Test::Reporters::Abstract

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

Overview

Test Reporter Base Class

Direct Known Subclasses

AbstractHash, Dotprogress

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runner) ⇒ Abstract

Returns a new instance of Abstract.



22
23
24
25
26
27
28
# File 'lib/rubytest/format/abstract.rb', line 22

def initialize(runner)
  @runner = runner
  #@source = {}

  # in case start_suite is overridden
  @start_time = Time.now
end

Instance Attribute Details

#runnerObject (readonly)

Returns the value of attribute runner.



31
32
33
# File 'lib/rubytest/format/abstract.rb', line 31

def runner
  @runner
end

Class Method Details

.inherited(base) ⇒ Object



12
13
14
# File 'lib/rubytest/format/abstract.rb', line 12

def self.inherited(base)
  registry << base
end

.registryObject



17
18
19
# File 'lib/rubytest/format/abstract.rb', line 17

def self.registry
  @registry ||= []
end

Instance Method Details

#begin_case(test_case) ⇒ Object



39
40
# File 'lib/rubytest/format/abstract.rb', line 39

def begin_case(test_case)
end

#begin_suite(test_suite) ⇒ Object



34
35
36
# File 'lib/rubytest/format/abstract.rb', line 34

def begin_suite(test_suite)
  @start_time = Time.now
end

#begin_test(test) ⇒ Object



43
44
# File 'lib/rubytest/format/abstract.rb', line 43

def begin_test(test)
end

#end_case(test_case) ⇒ Object



79
80
# File 'lib/rubytest/format/abstract.rb', line 79

def end_case(test_case)
end

#end_suite(test_suite) ⇒ Object



83
84
# File 'lib/rubytest/format/abstract.rb', line 83

def end_suite(test_suite)
end

#end_test(test) ⇒ Object



75
76
# File 'lib/rubytest/format/abstract.rb', line 75

def end_test(test)
end

#error(test, exception) ⇒ Object

Report a test error.



67
68
# File 'lib/rubytest/format/abstract.rb', line 67

def error(test, exception)
end

#fail(test, exception) ⇒ Object



63
64
# File 'lib/rubytest/format/abstract.rb', line 63

def fail(test, exception)
end

#pass(test) ⇒ Object



59
60
# File 'lib/rubytest/format/abstract.rb', line 59

def pass(test)
end

#skip_case(test_case) ⇒ Object



47
48
# File 'lib/rubytest/format/abstract.rb', line 47

def skip_case(test_case)
end

#skip_test(test) ⇒ Object



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

def skip_test(test)
end

#todo(test, exception) ⇒ Object

Report a pending test.



71
72
# File 'lib/rubytest/format/abstract.rb', line 71

def todo(test, exception)
end