Class: Minitest::Requeue
- Inherits:
-
Skip
- Object
- Skip
- Minitest::Requeue
- Extended by:
- T::Sig
- Defined in:
- lib/minitest/distributed/result_type.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message, original_result:) ⇒ Requeue
constructor
A new instance of Requeue.
- #result_label ⇒ Object
Constructor Details
#initialize(message, original_result:) ⇒ Requeue
Returns a new instance of Requeue.
48 49 50 51 |
# File 'lib/minitest/distributed/result_type.rb', line 48 def initialize(, original_result:) @original_result = original_result super() end |
Class Method Details
.wrap(result, attempt:, max_attempts:) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/minitest/distributed/result_type.rb', line 59 def self.wrap(result, attempt:, max_attempts:) failure = T.must(result.failure) = "#{failure.}\n\nThe test will be retried (attempt #{attempt} of #{max_attempts})" requeue_assertion = Minitest::Requeue.new(, original_result: result) requeue_assertion.set_backtrace(failure.backtrace) requeued_result = result.dup requeued_result.failures = [requeue_assertion] requeued_result end |
Instance Method Details
#result_label ⇒ Object
54 55 56 |
# File 'lib/minitest/distributed/result_type.rb', line 54 def result_label "Requeued" end |