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



12
13
14
15
16
17
18
19
20
21
# File 'lib/mutant/selector/expression.rb', line 12

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