rspec-style-guide
rspec-style-guide copied to clipboard
Recommend using random spec order
It's strange that the guide is missing that.
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
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.