test
summary = duplicates.map do |spec, files|
files_list = files.to_a
exact_match_file = files_list.find { |file| spec_files[spec].include?(file) }
primary_file = exact_match_file || files_list.first
other_files = files_list.reject { |file| file == primary_file }.join(', ')
" - **_#{spec}_** is listed in **_#{File.basename(primary_file)}_** but it will also run as part of **_#{other_files}_**."
endsummary = duplicates.map do |spec, files| files_list = files.to_a exact_match_file = files_list.find { |file| spec_files[spec].include?(file) } primary_file = exact_match_file || files_list.first other_files = files_list.reject { |file| file == primary_file }.join(', ') " - **_#{spec}_** is listed in **_#{File.basename(primary_file)}_** but it will also run as part of **_#{other_files}_**." end