It's mentioned in the upgrade guide Rails 5 will order tests randomly. It's trivial to revert to fixed order, but I'm just wondering why this change was made? Is it to support parallel testing?
Random test ordering is good practice. If you always do your test in a fixed order there is a chance your tests depend on each other. Each test should have no side effects, and random ordering guarantees this.
Refereed to Rails 5 Awesome features
Rails 5 order test cases randomly, the new runner is, in fact, my favourite piece of Rails 5. I love minitest, and I always was a bit envy of RSpec users, as they have a great runner that allows you to specify the file and line number of a failing spec.
Now, thanks to Yves Senn, we have the same feature when using Rails’ minitest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With