Sha256: a399644904aef41b5e77491677a115b196188300c1aa0de4299a7d3f02d427c7

Contents?: true

Size: 1.03 KB

Versions: 13

Compression:

Stored size: 1.03 KB

Contents

module Mutant
  class Runner
    # Mutation runner
    class Mutation < self
      include Concord::Public.new(:config, :mutation)

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

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

      # Test if mutation was handeled successfully
      #
      # @return [true]
      #   if successful
      #
      # @return [false]
      #   otherwise
      #
      # @api private
      #
      def success?
        mutation.success?(killer)
      end

    private

      # Perform operation
      #
      # @return [undefined]
      #
      # @api private
      #
      def run
        @killer = config.strategy.kill(mutation)
        report(@killer)
      end

    end # Mutation
  end # Runner
end # Mutant

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mutant-0.3.0.beta14 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta13 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta12 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta11 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta10 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta9 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta8 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta7 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta6 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta5 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta4 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta3 lib/mutant/runner/mutation.rb
mutant-0.3.0.beta2 lib/mutant/runner/mutation.rb