-
Notifications
You must be signed in to change notification settings - Fork 9
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
why are steps still randomized #33
Comments
I'm using Rails 5.0.1 and Rspec 3.5:
In rails_helper.rb have:
|
Randomizing order is an optional feature of rSpec and isn't appropriate for use with rspec-steps. I would check your ./.rspec and ~/.rspec files for the |
If you really need random order for the rest of your specs, you may be able to tell just the steps specs to run in order by tagging those example groups with { :order => :defined } as described here in the rspec docs |
Adding :order => :defined did the trick, thank you.
And that makes perfect sense, however I was fooled by the README saying "The examples above will be run in order" which I understood to mean part of the steps' behinds the scene magic was to prevent randomization. Perhaps it would be good to show order: :defined in that example code on the REDAME? If I had to guess, many or most moderately complex projects probably do rely on randomization for everything except the Steps, to better uncover unintentional sequential dependencies, so explicitly addressing the need to disable that for Steps is probably a good idea. |
Given spec/features/test_spec.rb
running
rspec spec/features/test_spec.rb
twice gives:and then:
The text was updated successfully, but these errors were encountered: