Class: Test::Unit::UI::Statistics::CaseStatistics
- Inherits:
-
Object
- Object
- Test::Unit::UI::Statistics::CaseStatistics
- Defined in:
- lib/test/unit/ui/statistics.rb
Instance Attribute Summary collapse
-
#errs ⇒ Object
Returns the value of attribute errs.
-
#fail ⇒ Object
Returns the value of attribute fail.
-
#note ⇒ Object
Returns the value of attribute note.
-
#omit ⇒ Object
Returns the value of attribute omit.
-
#pass ⇒ Object
Returns the value of attribute pass.
-
#pend ⇒ Object
Returns the value of attribute pend.
Instance Method Summary collapse
- #complete ⇒ Object
- #elapsed_time ⇒ Object
- #end_time ⇒ Object
-
#initialize(results) ⇒ CaseStatistics
constructor
A new instance of CaseStatistics.
Constructor Details
#initialize(results) ⇒ CaseStatistics
Returns a new instance of CaseStatistics.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/test/unit/ui/statistics.rb', line 10 def initialize results self.pass = 0 self.fail = 0 self.errs = 0 self.pend = 0 self.omit = 0 self.note = 0 @start_time = Time.now @end_time = nil end |
Instance Attribute Details
#errs ⇒ Object
Returns the value of attribute errs.
5 6 7 |
# File 'lib/test/unit/ui/statistics.rb', line 5 def errs @errs end |
#fail ⇒ Object
Returns the value of attribute fail.
4 5 6 |
# File 'lib/test/unit/ui/statistics.rb', line 4 def fail @fail end |
#note ⇒ Object
Returns the value of attribute note.
8 9 10 |
# File 'lib/test/unit/ui/statistics.rb', line 8 def note @note end |
#omit ⇒ Object
Returns the value of attribute omit.
7 8 9 |
# File 'lib/test/unit/ui/statistics.rb', line 7 def omit @omit end |
#pass ⇒ Object
Returns the value of attribute pass.
3 4 5 |
# File 'lib/test/unit/ui/statistics.rb', line 3 def pass @pass end |
#pend ⇒ Object
Returns the value of attribute pend.
6 7 8 |
# File 'lib/test/unit/ui/statistics.rb', line 6 def pend @pend end |
Instance Method Details
#complete ⇒ Object
29 30 31 |
# File 'lib/test/unit/ui/statistics.rb', line 29 def complete @end_time = Time.now end |
#elapsed_time ⇒ Object
21 22 23 |
# File 'lib/test/unit/ui/statistics.rb', line 21 def elapsed_time end_time - @start_time end |
#end_time ⇒ Object
25 26 27 |
# File 'lib/test/unit/ui/statistics.rb', line 25 def end_time @end_time ? @end_time : Time.now end |