class ParallelTests

def self.tests_in_groups(root, num, options={})

finds all tests and partitions them into groups
def self.tests_in_groups(root, num, options={})
  tests_with_sizes = find_tests_with_sizes(root)
  tests_with_sizes = slow_specs_first(tests_with_sizes) unless options[:no_sort]
  # always add to smallest group
  groups = Array.new(num){{:tests => [], :size => 0}}
  tests_with_sizes.each do |test, size|
    smallest = groups.sort_by{|g| g[:size] }.first
    smallest[:tests] << test
    smallest[:size] += size
  end
  groups.map{|g| g[:tests] }
end