Class: Crystalball::Predictor::ModifiedExecutionPaths

Inherits:
Object
  • Object
show all
Includes:
Helpers::AffectedExampleGroupsDetector, Strategy
Defined in:
lib/crystalball/predictor/modified_execution_paths.rb

Overview

Used with ‘predictor.use Crystalball::Predictor::ModifiedExecutionPaths.new`. When used will check the map which specs depend on which files and will return only those specs which depend on files modified since last time map was generated.

Instance Method Summary collapse

Methods included from Helpers::PathFormatter

#format_path, #format_paths

Methods included from Helpers::AffectedExampleGroupsDetector

#detect_examples

Instance Method Details

#call(diff, map) ⇒ Array<String>

Returns the spec paths associated with the changes.

Parameters:

Returns:

  • (Array<String>)

    the spec paths associated with the changes



20
21
22
23
24
# File 'lib/crystalball/predictor/modified_execution_paths.rb', line 20

def call(diff, map)
  super do
    detect_examples(diff.map(&:relative_path), map)
  end
end