nevans (owner)

Revisions

  • 97004a nevans Fri Oct 02 08:33:53 -0700 2009
  • d1b2d5 nevans Fri Oct 02 08:33:20 -0700 2009
gist: 199825 Download_button fork
public
Public Clone URL: git://gist.github.com/199825.git
Embed All Files: show embed
README #
1
2
3
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.
cucumber.yml #
1
default: -r features -f RailsLoggerFormatter
features/support/rails_logger_formatter.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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