Class: FeatureMap::Private::TestPyramid::RspecMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/feature_map/private/test_pyramid/rspec_mapper.rb

Class Method Summary collapse

Class Method Details

.map_tests_by_assignment(examples, assignments) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/feature_map/private/test_pyramid/rspec_mapper.rb', line 6

def map_tests_by_assignment(examples, assignments)
  normalized_assignments = transform_assignments(assignments)
  examples_by_file = examples.group_by { |ex| filepath(ex['id']) }

  normalized_assignments.transform_values do |files|
    count_example_files(examples_by_file, files)
  end
end