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

Recommend using random spec order #67

Open
pirj opened this issue Nov 23, 2018 · 2 comments
Open

Recommend using random spec order #67

pirj opened this issue Nov 23, 2018 · 2 comments
Assignees

Comments

@pirj
Copy link
Member

pirj commented Nov 23, 2018

It's strange that the guide is missing that.

@pirj pirj self-assigned this Feb 5, 2019
@andyw8
Copy link
Contributor

andyw8 commented Apr 28, 2019

As a possible reference:

RSpec is capable of running your specs in :random order, and we generally recommend you do that.

Effective Testing with RSpec 3, Chapter 8

@pirj
Copy link
Member Author

pirj commented Apr 29, 2019

Alternatively, RSpec's spec_helper.rb template can also be used as a reference.

Run specs in random order to surface order dependencies. If you find an order dependency and want to debug it, you can fix the order by providing the seed, which is printed after each run.

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