Class: Minitest::Proptest::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/proptest/status.rb

Overview

Sum type representing the possible statuses of a test run. Invalid, Overrun, and Interesting represent different failure classes. Exhausted represents having generated too many invalid test cases to verify the property. This precipitates as a failure class (the property is not proved) but can be a matter of inappropriate predicates in ‘where` blocks. Unknown represents a lack of information about the test run (typically having not run to satisfaction). Valid represents a test which has run to satisfaction.

Direct Known Subclasses

Exhausted, Interesting, Invalid, Overrun, Unknown, Valid

Defined Under Namespace

Classes: Exhausted, Interesting, Invalid, Overrun, Unknown, Valid

Instance Method Summary collapse

Constructor Details

#initializeStatus

Returns a new instance of Status.



71
72
73
# File 'lib/minitest/proptest/status.rb', line 71

def initialize
  raise 'Please use singleton instances'
end

Instance Method Details

#exhausted?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/minitest/proptest/status.rb', line 59

def exhausted?
  self.is_a?(Exhausted)
end

#interesting?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/minitest/proptest/status.rb', line 67

def interesting?
  self.is_a?(Interesting)
end

#invalid?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/minitest/proptest/status.rb', line 47

def invalid?
  self.is_a?(Invalid)
end

#overrun?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/minitest/proptest/status.rb', line 51

def overrun?
  self.is_a?(Overrun)
end

#unknown?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/minitest/proptest/status.rb', line 55

def unknown?
  self.is_a?(Unknown)
end

#valid?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/minitest/proptest/status.rb', line 63

def valid?
  self.is_a?(Valid)
end