Class: DeepTest::Test::WorkResult
- Inherits:
-
Test::Unit::TestResult
- Object
- Test::Unit::TestResult
- DeepTest::Test::WorkResult
- 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.
7 8 9 10 |
# File 'lib/deep_test/test/work_result.rb', line 7 def initialize(identifier) super() @identifier = identifier end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
4 5 6 |
# File 'lib/deep_test/test/work_result.rb', line 4 def identifier @identifier end |
#output ⇒ Object
Returns the value of attribute output.
5 6 7 |
# File 'lib/deep_test/test/work_result.rb', line 5 def output @output end |
Instance Method Details
#add_error(error) ⇒ Object
24 25 26 27 |
# File 'lib/deep_test/test/work_result.rb', line 24 def add_error(error) error.make_exception_marshallable super(error) end |
#add_to(result) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/deep_test/test/work_result.rb', line 12 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
29 30 31 |
# File 'lib/deep_test/test/work_result.rb', line 29 def failed_due_to_deadlock? @errors.any? && DeepTest::DeadlockDetector.due_to_deadlock?(@errors.last) end |