Class: LiveUnit::Reporter
- Inherits:
-
Object
- Object
- LiveUnit::Reporter
- Defined in:
- lib/liveunit/reporter.rb
Overview
subclass this to create custom reporters
Direct Known Subclasses
Instance Attribute Summary collapse
-
#liveunit_assertions ⇒ Object
Returns the value of attribute liveunit_assertions.
-
#liveunit_fails ⇒ Object
Returns the value of attribute liveunit_fails.
-
#liveunit_passes ⇒ Object
Returns the value of attribute liveunit_passes.
-
#liveunit_results ⇒ Object
Returns the value of attribute liveunit_results.
Instance Method Summary collapse
-
#initialize ⇒ Reporter
constructor
A new instance of Reporter.
-
#report ⇒ Object
gets called after each evaluation to store the result.
Constructor Details
#initialize ⇒ Reporter
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_assertions ⇒ Object
Returns the value of attribute liveunit_assertions.
5 6 7 |
# File 'lib/liveunit/reporter.rb', line 5 def liveunit_assertions @liveunit_assertions end |
#liveunit_fails ⇒ Object
Returns the value of attribute liveunit_fails.
5 6 7 |
# File 'lib/liveunit/reporter.rb', line 5 def liveunit_fails @liveunit_fails end |
#liveunit_passes ⇒ Object
Returns the value of attribute liveunit_passes.
5 6 7 |
# File 'lib/liveunit/reporter.rb', line 5 def liveunit_passes @liveunit_passes end |
#liveunit_results ⇒ Object
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
#report ⇒ Object
gets called after each evaluation to store the result
15 16 17 |
# File 'lib/liveunit/reporter.rb', line 15 def report #overwrite me end |