Class: DeepTest::Test::WorkUnit
- Inherits:
-
Object
- Object
- DeepTest::Test::WorkUnit
- Defined in:
- lib/deep_test/test/work_unit.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(test_case) ⇒ WorkUnit
constructor
A new instance of WorkUnit.
- #run ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(test_case) ⇒ WorkUnit
Returns a new instance of WorkUnit.
4 5 6 |
# File 'lib/deep_test/test/work_unit.rb', line 4 def initialize(test_case) @test_case = test_case end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 22 |
# File 'lib/deep_test/test/work_unit.rb', line 19 def ==(other) return false unless other.class == self.class @test_case == other.instance_variable_get(:@test_case) end |
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/deep_test/test/work_unit.rb', line 8 def run result = run_without_deadlock_protection result = run_without_deadlock_protection if result.failed_due_to_deadlock? if result.failed_due_to_deadlock? result = WorkResult.new(@test_case.name) result.add_run result.output = "-deadlock-" end result end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/deep_test/test/work_unit.rb', line 24 def to_s @test_case.to_s end |