15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/deface/utils/failure_finder.rb', line 15
def output_results_by_virtual_path(virtual_path)
has_failz = 0
fails = overrides_by_virtual_path(virtual_path)
return(has_failz += 1) if fails.nil?
count = fails.group_by{ |o| !o.failure.nil? }
if count.key?(true)
has_failz += count[true].count
puts "#{count[true].count} of #{fails.count} override(s) failed for :virtual_path => '#{virtual_path}'"
else
puts "0 of #{fails.count} override(s) failed for :virtual_path => '#{virtual_path}'"
end
fails.each do |override|
if override.failure.nil?
puts " '#{override.name}' reported no failures".green
else
puts " '#{override.name}' #{override.failure}".red
end
end
has_failz
end
|