Class: Henitai::TestPrioritizer

Inherits:
Object
  • Object
show all
Defined in:
lib/henitai/test_prioritizer.rb

Overview

Orders test files so previously effective tests run first.

Instance Method Summary collapse

Instance Method Details

#sort(tests, _mutant, history) ⇒ Object



6
7
8
9
10
# File 'lib/henitai/test_prioritizer.rb', line 6

def sort(tests, _mutant, history)
  Array(tests).each_with_index.sort_by do |test, index|
    [-history_count(history, test), index]
  end.map(&:first)
end