Created
October 2, 2009 15:33
-
-
Save nevans/199825 to your computer and use it in GitHub Desktop.
cucumber RailsLoggerFormatter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Works with cucumber 0.3.104. Earlier versions of | |
cucumber use a slightly different formatter API, | |
and will require small tweaks to make this work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: -r features -f RailsLoggerFormatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cucumber/formatter/pretty' | |
class RailsLoggerFormatter < Cucumber::Formatter::Pretty | |
def before_feature(feature) | |
Rails.logger.info "****** Feature ***********************************" | |
Rails.logger.info feature.name.map{|l|"** "+l}.join | |
super | |
end | |
def scenario_name(keyword, name, file_colon_line, source_indent) | |
Rails.logger.info "****** Scenario **********************************" | |
Rails.logger.info name.map{|l|"**** "+l}.join | |
super | |
end | |
def before_step(step) | |
Rails.logger.info "****** Step: #{step.name}" | |
super | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment