Module: Minitest::Flakiness
- Defined in:
- lib/minitest/queue.rb
Instance Method Summary collapse
- #flaked? ⇒ Boolean
- #mark_as_flaked! ⇒ Object
-
#skipped? ⇒ Boolean
Make failed flaky tests acts as skips for reporters not aware of the difference.
Instance Method Details
#flaked? ⇒ Boolean
91 92 93 94 |
# File 'lib/minitest/queue.rb', line 91 def flaked? @flaky ||= false !!((Flaked === failure) || @flaky) end |
#mark_as_flaked! ⇒ Object
96 97 98 99 100 101 102 |
# File 'lib/minitest/queue.rb', line 96 def mark_as_flaked! if passed? @flaky = true else self.failures.unshift(Flaked.new(self.failures.shift)) end end |
#skipped? ⇒ Boolean
Make failed flaky tests acts as skips for reporters not aware of the difference.
87 88 89 |
# File 'lib/minitest/queue.rb', line 87 def skipped? super || flaked? end |