cuke-pack/lib/cucumber/cleanup_formatter.rb

26 lines
535 B
Ruby
Raw Normal View History

2012-04-25 13:29:52 +00:00
require 'cucumber/formatter/ansicolor'
module Cucumber
class CleanupFormatter
include Cucumber::Formatter::ANSIColor
def initialize(step_mother, path_or_io, options)
@step_mother = step_mother
end
def after_features(features)
defs = @step_mother.unmatched_step_definitions
if !defs.empty?
$stdout.puts yellow("The following steps are unused:")
$stdout.puts
defs.each do |step|
$stdout.puts yellow(step.file_colon_line)
end
end
end
end
end