features/step_definitions/generator_steps.rb in technicalpickles-jeweler-1.0.1 vs features/step_definitions/generator_steps.rb in technicalpickles-jeweler-1.0.2

- old
+ new

@@ -4,10 +4,26 @@ Given /^I want cucumber stories$/ do @use_cucumber = true end +Given /^I do not want reek$/ do + @use_reek = false +end + +Given /^I want reek$/ do + @use_reek = true +end + +Given /^I do not want roodi$/ do + @use_roodi = false +end + +Given /^I want roodi$/ do + @use_roodi = true +end + And /^I do not want rubyforge setup$/ do @use_rubyforge = false end And /^I want rubyforge setup$/ do @@ -35,25 +51,33 @@ Given /^I set JEWELER_OPTS env variable to "(.*)"$/ do |val| ENV['JEWELER_OPTS'] = val end -When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '(.*)'$/ do |testing_framework, name, summary| +When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)'$/ do |testing_framework, name, summary| + When "I generate a #{testing_framework}project named '#{name}' that is '#{summary}' and described as ''" +end + +When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)' and described as '([^']*)'$/ do |testing_framework, name, summary, description| @name = name @summary = summary + @description = description testing_framework = testing_framework.squeeze.strip unless testing_framework.blank? @testing_framework = testing_framework.to_sym end arguments = ['--directory', "#{@working_dir}/#{@name}", '--summary', @summary, + '--description', @description, @use_cucumber ? '--cucumber' : nil, @testing_framework ? "--#{@testing_framework}" : nil, @use_rubyforge ? '--rubyforge' : nil, + @use_roodi ? '--roodi' : nil, + @use_reek ? '--reek' : nil, @name].compact @stdout = OutputCatcher.catch_out do Jeweler::Generator::Application.run! *arguments end