Method: WhatToRun.cov_map
- Defined in:
- lib/what_to_run.rb
.cov_map ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/what_to_run.rb', line 43 def cov_map schema = Hash.new { |h, file| h[file] = Hash.new { |i, line| i[line] = [] } } @cov_map ||= Tracker.read.inject(schema) do |cov_map, (desc, cov_delta)| cov_delta.each_pair do |file, lines| file_map = cov_map[file] lines.each_with_index do |line, i| file_map[i + 1] << desc if line_executed?(line) end end cov_map end end |