module Assert::Result

Constants

TestFailure

raised by the “fail” context helper to break test execution

TestSkipped

raised by the “skip” context helper to break test execution

Public Class Methods

new(data = nil) click to toggle source
# File lib/assert/result.rb, line 25
def self.new(data = nil)
  data ||= {}
  types[data[:type]].new(data)
end
types() click to toggle source
# File lib/assert/result.rb, line 15
def self.types
  @types ||= Hash.new{ |_h, _k| Base }.tap{ |hash|
    hash[:pass]   = Pass
    hash[:fail]   = Fail
    hash[:ignore] = Ignore
    hash[:skip]   = Skip
    hash[:error]  = Error
  }.freeze
end