From b740aff5787cce738f8f649a26f988fea90a53ef Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 25 Apr 2012 09:17:07 -0400 Subject: [PATCH] we'll do our own underscore --- lib/cucumber/step_writer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cucumber/step_writer.rb b/lib/cucumber/step_writer.rb index c2f7c3b..dd3902a 100644 --- a/lib/cucumber/step_writer.rb +++ b/lib/cucumber/step_writer.rb @@ -28,7 +28,7 @@ module Cucumber step_name = Cucumber::Undefined === step.exception ? step.exception.step_name : step.name step_multiline_class = step.multiline_arg ? step.multiline_arg.class : nil - path = Pathname(@io).join(step.actual_keyword.downcase.strip, step_name.underscore.gsub(%r{[^\w]+}, '_') + '.rb') + path = Pathname(@io).join(step.actual_keyword.downcase.strip, step_name.downcase.gsub(%r{[^\w]+}, '_').gsub(%r{^_|_$}, '') + '.rb') if !path.file? puts yellow("Writing new step to #{path}.")