Class: LiveUnit::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/liveunit/reporter.rb

Overview

subclass this to create custom reporters

Direct Known Subclasses

PrintReporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReporter

Returns a new instance of Reporter.



7
8
9
10
11
12
# File 'lib/liveunit/reporter.rb', line 7

def initialize
  @liveunit_assertions = 0
  @liveunit_passes = 0
  @liveunit_fails = 0
  @liveunit_results = []
end

Instance Attribute Details

#liveunit_assertionsObject

Returns the value of attribute liveunit_assertions.



5
6
7
# File 'lib/liveunit/reporter.rb', line 5

def liveunit_assertions
  @liveunit_assertions
end

#liveunit_failsObject

Returns the value of attribute liveunit_fails.



5
6
7
# File 'lib/liveunit/reporter.rb', line 5

def liveunit_fails
  @liveunit_fails
end

#liveunit_passesObject

Returns the value of attribute liveunit_passes.



5
6
7
# File 'lib/liveunit/reporter.rb', line 5

def liveunit_passes
  @liveunit_passes
end

#liveunit_resultsObject

Returns the value of attribute liveunit_results.



5
6
7
# File 'lib/liveunit/reporter.rb', line 5

def liveunit_results
  @liveunit_results
end

Instance Method Details

#reportObject

gets called after each evaluation to store the result



15
16
17
# File 'lib/liveunit/reporter.rb', line 15

def report
  #overwrite me
end