[rspec-users] cucumber command
josephwilk at joesniff.co.uk
Fri Dec 26 06:25:20 EST 2008
Juanma Cervera wrote:
> I want to use the cucumber command to run only the feature I am working
> on now.
> But I have a structure of folders like this:
> When I use "rake features" all works, but I am running all the features.
> Now I want to run only one of the features.
> cucumber --language es features/administracion/alta_centros.feature
> And the feature fails. It seems that it is not reading env.rb and the
> other step definition files.
When running the cucumber command directly it will implicitly require
the sibling and ancestor ruby files of the feature. So as you suggested
it will not auto load your env.rb or you step_definitions folder.
> Can I have a folder structure like this?
You can have whatever folder structure you want. If you look at the
default layout generated by cucumber it uses a similar structure to what
you have now (support / step_definitions).
> How I have to use the cucumber command to make this.
If you want to use the tool directly you could do:
cucumber --require features/support/ --require
features/step_definitions/ --language es
More information about the rspec-users