Class: Hegel::Report::Failure

Inherits:
Struct
  • Object
show all
Defined in:
lib/hegel/report.rb,
sig/hegel.rbs

Overview

One failure's rendered ingredients. test_cases and discarded are the generation phase's own counts up to that failure's first appearance (see Hegel::Runner::GenerationStats), not the shrink phase's. entries is the [:draw, name, value] / [:note, message] list Hegel::TestCase recorded on the final replay that produced this failure, in call order, still un-#inspect'd/un-#to_s'd (see Hegel::TestCase#record_draw and #note for why). blob is the string Hegel.test(reproduce_failure:) accepts to replay this same failure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFailure

Returns a new instance of Failure.

Parameters:

  • test_cases: (Integer)
  • discarded: (Integer)
  • entries: (Array[[:draw, String, untyped] | [:note, untyped]])
  • blob: (String)


340
# File 'sig/hegel.rbs', line 340

def initialize: (test_cases: Integer, discarded: Integer, entries: Array[[:draw, String, untyped] | [:note, untyped]], blob: String) -> void

Instance Attribute Details

#blobObject

Returns the value of attribute blob

Returns:

  • (Object)

    the current value of blob



21
22
23
# File 'lib/hegel/report.rb', line 21

def blob
  @blob
end

#discardedObject

Returns the value of attribute discarded

Returns:

  • (Object)

    the current value of discarded



21
22
23
# File 'lib/hegel/report.rb', line 21

def discarded
  @discarded
end

#entriesObject

Returns the value of attribute entries

Returns:

  • (Object)

    the current value of entries



21
22
23
# File 'lib/hegel/report.rb', line 21

def entries
  @entries
end

#test_casesObject

Returns the value of attribute test_cases

Returns:

  • (Object)

    the current value of test_cases



21
22
23
# File 'lib/hegel/report.rb', line 21

def test_cases
  @test_cases
end