Skip to content

Run spec files in order

gitlab-qa-bot requested to merge github/fork/hubertlepicki/ordered_specs into master

Created by: hubertlepicki

Hi guys,

I was doing some work on Mongoid library, when I noticed that it's test suite is failing on Linux, yet it passes on MacOS X. What stuck me is that Rake's FileList[pattern] returns list of files ordered differently on Linux tan on Mac.

Mongoid's test suite re-sets or re-configures itself at specific points during tests, and relies on the alphabetical order of files to be run.

This patch sorts the files before running them, to get MacOS-like behavior on all platforms, including Linux.

Please let me know if this is good and useful -- I am not sure myself.

Merge request reports