Forum: RSpec Command to run a single scenario using cucumber

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Anil G. (Guest)
on 2009-05-01 22:19
Hi,
I have installed cucumber and was able to run all the scenarios using
rake features, but can body tell me.
What is the command to run a single scenario?

Thanks,
Anil kumar.
Ben M. (Guest)
on 2009-05-01 23:56
(Received via mailing list)
Anil G. wrote:
> Hi,
> I have installed cucumber and was able to run all the scenarios using
> rake features, but can body tell me.
> What is the command to run a single scenario?
>
> Thanks,
> Anil kumar.
>

bmabey@BenzII:~/$ cucumber --help
Usage: cucumber [options] [ [FILE|DIR|URL][:LINE[:LINE]*] ]+

Examples:
cucumber examples/i18n/en/features
cucumber --language it examples/i18n/it/features/somma.feature:6:98:113
cucumber -n -i http://rubyurl.com/eeCl
...
...



So, to run a single scenario you just need to specify it's line number
with the colon syntax. "cucumber features/something.feature:42"

Using the cucumber binary is the preferred way of running cucumber.  I
like to reserve using the rake task for CI servers.

-Ben
This topic is locked and can not be replied to.