Class: Evilution::Integration::Base Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/integration/base.rb

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.

Direct Known Subclasses

Minitest, RSpec, TestUnit

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hooks: nil, mutation_applier: Evilution::Integration::Loading::MutationApplier.new) ⇒ Base

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.

Returns a new instance of Base.



15
16
17
18
# File 'lib/evilution/integration/base.rb', line 15

def initialize(hooks: nil, mutation_applier: Evilution::Integration::Loading::MutationApplier.new)
  @hooks = hooks
  @mutation_applier = mutation_applier
end

Class Method Details

.baseline_optionsObject

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.

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/evilution/integration/base.rb', line 11

def self.baseline_options
  raise NotImplementedError, "#{name}.baseline_options must be implemented"
end

.baseline_runnerObject

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.

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/evilution/integration/base.rb', line 7

def self.baseline_runner
  raise NotImplementedError, "#{name}.baseline_runner must be implemented"
end

Instance Method Details

#call(mutation) ⇒ 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.



20
21
22
23
24
25
26
27
28
# File 'lib/evilution/integration/base.rb', line 20

def call(mutation)
  ensure_framework_loaded
  fire_hook(:mutation_insert_pre, mutation: mutation, file_path: mutation.file_path)
  load_error = @mutation_applier.call(mutation)
  return load_error if load_error

  fire_hook(:mutation_insert_post, mutation: mutation, file_path: mutation.file_path)
  run_tests(mutation)
end