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
# 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(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:          env,
    runtime:      env.world.timer.now - @start,
    test_results: @test_results
  )
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