Module: Minitest::Flakiness

Defined in:
lib/minitest/queue.rb

Instance Method Summary collapse

Instance Method Details

#flaked?Boolean

Returns:

  • (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.

Returns:

  • (Boolean)


87
88
89
# File 'lib/minitest/queue.rb', line 87

def skipped?
  super || flaked?
end