Sha256: 882c3b8e79e81a3da4377d8f519eb2e902dae4f2bcad826ac414c54e2383bebf

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

module Mutant
  class Runner
    # Killer runner
    class Killer < self
      include Equalizer.new(:config, :killer)

      register Mutant::Killer

      # Return killer
      #
      # @return [Killer]
      #
      # @api private
      #
      attr_reader :killer
      protected :killer

      # Return kill report
      #
      # @return [Killer::Report]
      #
      # @api private
      #
      attr_reader :report

      # Test if killer ran successfully
      #
      # @return [Boolean]
      #
      # @api private
      def success?
        @report.success?
      end

      # Test if this killer ALONE can determine if mutation is dead
      #
      # @return [Boolean]
      #
      def mutation_dead?
        test_report = report.test_report
        killer.mutation.should_fail? && test_report.failed?
      end

      # Initialize object
      #
      # @param [Config] config
      # @param [Mutation] mutation
      #
      # @return [undefined]
      #
      # @api private
      #
      def initialize(config, killer)
        @killer = killer
        super(config)
      end

    private

      # Run killer
      #
      # @api private
      #
      def run
        @report = killer.run
      end

    end # Killer
  end # Runner
end # Mutant

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mutant-0.5.23 lib/mutant/runner/killer.rb
mutant-0.5.22 lib/mutant/runner/killer.rb
mutant-0.5.21 lib/mutant/runner/killer.rb
mutant-0.5.20 lib/mutant/runner/killer.rb
mutant-0.5.19 lib/mutant/runner/killer.rb
mutant-0.5.18 lib/mutant/runner/killer.rb
mutant-0.5.17 lib/mutant/runner/killer.rb