Sha256: dc1c2e54c6447ab425f08ea3e39532160a8b793801114f8027b8afd7aaa6087a

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

module Mutant
  class Strategy

    # Rspec strategy base class
    class Rspec < self

      KILLER = Killer::Forking.new(Killer::Rspec)

      # DM2-style strategy
      class DM2 < self

        # Return filename pattern
        #
        # @return [Enumerable<String>]
        #
        # @api private
        #
        def self.spec_files(mutation)
          ExampleLookup.run(mutation)
        end
      end

      # Run all unit specs per mutation
      class Unit < self

        # Return file name pattern for mutation
        #
        # @return [Enumerable<String>]
        #
        # @api private
        #
        def self.spec_files(mutation)
          ['spec/unit']
        end
      end

      # Run all integration specs per mutation
      class Integration < self

        # Return file name pattern for mutation
        #
        # @return [Mutation]
        #
        # @api private
        #
        def self.spec_files(mutation)
          Dir['spec/integration/**/*_spec.rb']
        end
      end

      # Run all specs per mutation
      class Full < self
        def self.spec_files(mutation)
          Dir['spec/**/*_spec.rb']
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mutant-0.2.4 lib/mutant/strategy/rspec.rb
mutant-0.2.3 lib/mutant/strategy/rspec.rb
mutant-0.2.2 lib/mutant/strategy/rspec.rb
mutant-0.2.1 lib/mutant/strategy/rspec.rb