Class: DeepTest::Test::WorkResult
- Inherits:
-
Test::Unit::TestResult
- Object
- Test::Unit::TestResult
- DeepTest::Test::WorkResult
- Includes:
- CentralCommand::Result
- Defined in:
- lib/deep_test/test/work_result.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
- #add_error(error) ⇒ Object
- #add_to(result) ⇒ Object
- #failed_due_to_deadlock? ⇒ Boolean
-
#initialize(identifier) ⇒ WorkResult
constructor
A new instance of WorkResult.
Constructor Details
#initialize(identifier) ⇒ WorkResult
Returns a new instance of WorkResult.
8 9 10 11 |
# File 'lib/deep_test/test/work_result.rb', line 8 def initialize(identifier) super() @identifier = identifier end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
5 6 7 |
# File 'lib/deep_test/test/work_result.rb', line 5 def identifier @identifier end |
#output ⇒ Object
Returns the value of attribute output.
6 7 8 |
# File 'lib/deep_test/test/work_result.rb', line 6 def output @output end |
Instance Method Details
#add_error(error) ⇒ Object
25 26 27 28 |
# File 'lib/deep_test/test/work_result.rb', line 25 def add_error(error) error.make_exception_marshallable super(error) end |
#add_to(result) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/deep_test/test/work_result.rb', line 13 def add_to(result) @failures.each {|e| result.add_failure(e)} @errors.each do |e| e.resolve_marshallable_exception result.add_error(e) end assertion_count.times {result.add_assertion} run_count.times {result.add_run} end |
#failed_due_to_deadlock? ⇒ Boolean
30 31 32 |
# File 'lib/deep_test/test/work_result.rb', line 30 def failed_due_to_deadlock? @errors.any? && DeepTest::DeadlockDetector.due_to_deadlock?(@errors.last) end |