Class: Mutant::Selector::Expression Private

Inherits:
Mutant::Selector show all
Defined in:
lib/mutant/selector/expression.rb

Overview

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.

Expression based test selector

Instance Method Summary collapse

Instance Method Details

#call(subject) ⇒ Enumerable<Test>

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.

Tests for subject

Parameters:

Returns:

  • (Enumerable<Test>)


14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/mutant/selector/expression.rb', line 14

def call(subject)
  subject.match_expressions.each do |match_expression|
    subject_tests = integration.available_tests.select do |test|
      test.expressions.any? do |test_expression|
        match_expression.prefix?(test_expression)
      end
    end
    return subject_tests if subject_tests.any?
  end

  EMPTY_ARRAY
end