Sha256: 82532dacb2f2d15de88940aea46ef39070a913c6c43f7f112c84c50df71fdac9

Contents?: true

Size: 644 Bytes

Versions: 24

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

module Mutant
  class Selector
    # Expression based test selector
    class Expression < self
      include Concord.new(:integration)

      # Tests for subject
      #
      # @param [Subject] subject
      #
      # @return [Enumerable<Test>]
      def call(subject)
        subject.match_expressions.each do |match_expression|
          subject_tests = integration.all_tests.select do |test|
            match_expression.prefix?(test.expression)
          end
          return subject_tests if subject_tests.any?
        end

        EMPTY_ARRAY
      end

    end # Expression
  end # Selector
end # Mutant

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mutant-0.10.0 lib/mutant/selector/expression.rb
mutant-0.9.14 lib/mutant/selector/expression.rb
mutant-0.9.13 lib/mutant/selector/expression.rb
mutant-0.9.12 lib/mutant/selector/expression.rb
mutant-0.9.11 lib/mutant/selector/expression.rb
mutant-0.9.10 lib/mutant/selector/expression.rb
mutant-0.9.9 lib/mutant/selector/expression.rb
mutant-0.9.8 lib/mutant/selector/expression.rb
mutant-0.9.7 lib/mutant/selector/expression.rb
mutant-0.9.6 lib/mutant/selector/expression.rb
mutant-0.9.5 lib/mutant/selector/expression.rb
mutant-0.9.4 lib/mutant/selector/expression.rb
mutant-0.9.3 lib/mutant/selector/expression.rb
mutant-0.9.2 lib/mutant/selector/expression.rb
mutant-0.9.1 lib/mutant/selector/expression.rb
mutant-0.9.0 lib/mutant/selector/expression.rb
mutant-0.8.24 lib/mutant/selector/expression.rb
mutant-0.8.23 lib/mutant/selector/expression.rb
mutant-0.8.22 lib/mutant/selector/expression.rb
mutant-0.8.21 lib/mutant/selector/expression.rb