Class: Test::Unit::TestResult
- Inherits:
-
Object
- Object
- Test::Unit::TestResult
- Defined in:
- lib/shell_test/unit/shim.rb
Instance Method Summary collapse
-
#add_error(error) ⇒ Object
Partition errors from a SkipException from other errors and records as them as skips (the error is extended to display as a skip).
- #shell_test_original_add_error ⇒ Object
- #shell_test_original_to_s ⇒ Object
-
#skips ⇒ Object
Returns an array of skips recorded for self.
-
#to_s ⇒ Object
Adds the skip count to the summary.
Instance Method Details
#add_error(error) ⇒ Object
Partition errors from a SkipException from other errors and records as them as skips (the error is extended to display as a skip).
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/shell_test/unit/shim.rb', line 41 def add_error(error) if error.exception.kind_of?(ShellTest::Unit::SkipException) error.extend ShellTest::Unit::SkipDisplay skips << error else @errors << error end notify_listeners(FAULT, error) notify_listeners(CHANGED, self) end |
#shell_test_original_add_error ⇒ Object
37 |
# File 'lib/shell_test/unit/shim.rb', line 37 alias shell_test_original_add_error add_error |
#shell_test_original_to_s ⇒ Object
53 |
# File 'lib/shell_test/unit/shim.rb', line 53 alias shell_test_original_to_s to_s |
#skips ⇒ Object
Returns an array of skips recorded for self.
33 34 35 |
# File 'lib/shell_test/unit/shim.rb', line 33 def skips @skips ||= [] end |
#to_s ⇒ Object
Adds the skip count to the summary.
56 57 58 |
# File 'lib/shell_test/unit/shim.rb', line 56 def to_s "#{shell_test_original_to_s}, #{skips.length} skips" end |