Class: Mutant::Test::Runner::Sink Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/test/runner/sink.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.

Instance Method Summary collapse

Constructor Details

#initializeundefined

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.

Initialize object



12
13
14
15
16
# File 'lib/mutant/test/runner/sink.rb', line 12

def initialize(*)
  super
  @start        = env.world.timer.now
  @test_results = []
end

Instance Method Details

#response(response) ⇒ self

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.

Handle mutation finish

Returns:

  • (self)


39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/mutant/test/runner/sink.rb', line 39

def response(response)
  if response.error
    env.world.stderr.puts(response.log)
    fail response.error
  end

  @test_results << response.result.with(
    job_index: response.job.index,
    output:    response.log
  )

  self
end

#statusResult::Env

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.

Runner status

Returns:



21
22
23
24
25
26
27
# File 'lib/mutant/test/runner/sink.rb', line 21

def status
  Result::TestEnv.new(
    env:,
    runtime:      env.world.timer.now - @start,
    test_results: @test_results.sort_by!(&:job_index)
  )
end

#stop?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 scheduling stopped

Returns:

  • (Boolean)


32
33
34
# File 'lib/mutant/test/runner/sink.rb', line 32

def stop?
  status.stop?
end