Automatically generate Cucumber steps
Go to file
John Bintz 4dbc32d11e bump version 2012-04-25 09:17:19 -04:00
lib we'll do our own underscore 2012-04-25 09:17:07 -04:00
skel add a generator, 'cause i'm both lazy and not lazy 2012-04-19 16:01:46 -04:00
.gitignore initial commit 2012-04-18 15:34:06 -04:00
Gemfile initial commit 2012-04-18 15:34:06 -04:00
LICENSE initial commit 2012-04-18 15:34:06 -04:00
README.md add a generator, 'cause i'm both lazy and not lazy 2012-04-19 16:01:46 -04:00
Rakefile initial commit 2012-04-18 15:34:06 -04:00
cucumber-step_writer.gemspec bump version 2012-04-25 09:17:19 -04:00

README.md

Formatter for automatically generating step files for Cucumber. It's how I roll.

If you have a step like this:

Given I set something up

And you set up the formatter like this:

cucumber -f Cucumber::StepWriter --out features/step_definitions

Then features/step_definitions/given/i_set_something_up.rb will be generated with the content of the step stub.

If you want to fire an action after steps are generated, like open a directory with the list of files so you can rearrange them, add a hook to Cucumber::StepWriter:

Cucumber::StepWriter.after_write do |dir|
  system %{open #{dir}}
end

Set up your sane defaults by using the generator:

rails generator cucumber:step_writer

TODO:

  • If you want it to generate for different languages, I take pull requests.
  • Otherwise, I'll just add whatever I need when I need it.