Class: Mutant::Meta::Example::Verification Private

Inherits:
Object
  • Object
show all
Includes:
Unparser::Adamantium
Defined in:
lib/mutant/meta/example/verification.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Example verification

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_mutations(example:, mutations:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
14
15
16
17
18
19
# File 'lib/mutant/meta/example/verification.rb', line 11

def self.from_mutations(example:, mutations:)
  valid, invalid = [], []

  mutations.each do |mutation|
    mutation.either(invalid.public_method(:<<), valid.public_method(:<<))
  end

  new(example:, invalid:, valid:)
end

Instance Method Details

#error_reportObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/mutant/meta/example/verification.rb', line 35

def error_report
  reports.join("\n")
end

#success?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if mutation was verified successfully

Returns:

  • (Boolean)


24
25
26
27
28
29
30
31
32
# File 'lib/mutant/meta/example/verification.rb', line 24

def success?
  [
    invalid_report,
    missing,
    no_diffs,
    original_verification_report,
    unexpected
  ].all?(&:empty?)
end