Class: Mutant::Selector::Expression

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

Overview

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.

Return tests for subject


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

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