tags:

views:

47

answers:

1

Is there an easy way to initialize a cucumber folder structure like rails generators?

+2  A: 

From the documentation:

ruby script/generate cucumber

If you’re on an OS that supports fork (read: !Windows) we recommend you use Spork and —drb as this lets you start cucumber faster:

ruby script/generate cucumber --spork

For more help on the generator you can just ask for help:

ruby script/generate cucumber --help

ruby script/generate feature Frooble name:string color:string description:text

This will generate a simple plain text feature with associated steps. Don’t get addicted to this generator – you’re better off writing these by hand in the long run.

duncan
But that is for Rails only. Is there a way to do so in an arbitrary folder?
never_had_a_name
If you are not using rails, there is not much to generate, cucumber will include all features/support/**/*.rb files where you define your world. You place the features as features/feature_name.feature and steps in features/step_definitions/domain_name.rb
duncan