Module: Bacon

Defined in:
lib/greeneggs.rb

Overview

GreenEggs – small red/green patch for Bacon

“I do not like Green Eggs and Ham.” —Sam I Am

Copyright © 2009 Michael Fleet <disinnovate.com>

GreenEggs is freely distributable under the terms of the MIT license. See LICENSE or www.opensource.org/licenses/mit-license.php for details.

Constant Summary collapse

COLORS =
{
  'F'    => "\e[1m\e[31m", # FAILED: red
  :fail  => "\e[1m\e[31m",  # FAILED: red
  'E'    => "\e[1m\e[35m", # ERROR: purple
  'M'    => "\e[1m\e[33m", # MISSING: yellow
  :ok  => "\e[1m\e[32m"  # PASSED/OK: green
}

Class Method Summary collapse

Class Method Details

.handle_requirement(description) ⇒ Object



21
22
23
# File 'lib/greeneggs.rb', line 21

def handle_requirement(description)
  print(colorize_requirement { output_handle_requirement(description) { yield } })
end

.handle_summaryObject



26
27
28
# File 'lib/greeneggs.rb', line 26

def handle_summary
puts(colorize_summary { output_handle_summary })
end

.output_handle_requirementObject



20
# File 'lib/greeneggs.rb', line 20

alias_method :output_handle_requirement, :handle_requirement

.output_handle_summaryObject



25
# File 'lib/greeneggs.rb', line 25

alias_method :output_handle_summary, :handle_summary