Class: Lemon::CoverReports::Compact

Inherits:
Abstract
  • Object
show all
Defined in:
lib/lemon/coverage/formats/compact.rb

Instance Attribute Summary

Attributes inherited from Abstract

#coverage

Instance Method Summary collapse

Methods inherited from Abstract

#covered_units, #initialize, #tally, #uncovered_cases, #uncovered_units, #undefined_units

Constructor Details

This class inherits a constructor from Lemon::CoverReports::Abstract

Instance Method Details

#renderObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/lemon/coverage/formats/compact.rb', line 8

def render

  unless covered_units.empty?
    puts "\nCovered Units: "
    puts covered_units.map{ |u| u.to_s.ansi(:green) }.sort.join(', ')
  end

  unless undefined_units.empty?
    puts "\nOvercovered Units:"
    puts undefined_units.map{ |u| u.to_s.ansi(:cyan) }.sort.join(', ')
  end

  unless uncovered_units.empty?
    puts "\nUncovered Units: "
    puts uncovered_units.map{ |u| u.to_s.ansi(:yellow) }.sort.join(', ')
  end

  unless uncovered_cases.empty?
    puts "\nUncovered Cases: "
    puts uncovered_cases.map{ |m| m.name.ansi(:red) }.sort.join(', ')
  end

  puts
  puts tally
end