Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation : how to run only one scénario ? #241

Open
ranska opened this issue Aug 1, 2021 · 2 comments
Open

Documentation : how to run only one scénario ? #241

ranska opened this issue Aug 1, 2021 · 2 comments

Comments

@ranska
Copy link

ranska commented Aug 1, 2021

Hello,

First thanks a lot for this wonderfull gem that simplify a lot my testing journey (I love it more than cucumber for say)

I would like to know.
Is there a way tu run only one scenario from a feature file ?

In cucumber I was use to add a tag @current and run cucumber with --tag @current

Can we do such a thing here ?

It is very handy during development of one new feature to run only one test to dev it fast and then fix the whole feature.

@eins78
Copy link

eins78 commented Sep 15, 2021

Same as with plain rspec, you can append a line number to the filename to only run the scenario found at this line (must not start there, can also be in the middle).

example:

bundle exec rspec spec/features/some.feature:42

@ranska
Copy link
Author

ranska commented Sep 15, 2021

Hi I found that it work like cucumber too.

you can run this


bundle exec rspec --tags @current spec/features/some.feature

and tag the scenario you want with @current

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants