Module: MissCleo::TestSelector

Defined in:
lib/miss_cleo/test_selector.rb

Class Method Summary collapse

Class Method Details

.predict(coverage_map, lines_changed) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/miss_cleo/test_selector.rb', line 5

def predict(coverage_map, lines_changed)
  tests_to_run = []
  lines_changed.each do |file, line|
    tests_to_run |= coverage_map.tests_for_lines(file, line)
  end

  tests_to_run.sort.reverse
end