Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sort files to require for coverage reports
Dir.glob don't guarantee the order of the files it returns For example we have model in app/model/rss_feed.rb and his extension in app/model/rss_feed/import_export.rb - there is class defined without inheriting from ApplicationRecord so when class from import_export.rb is loaded first is it loaded as RssFeed < Object and when after this is app/model/rss_feed.rb loaded it is causing error(this warning is suppressed by silence_warnings): TypeError: superclass mismatch for class RssFeed and then RssFeed < ApplicationRecord is not loaded Sorting Dir.glob guarantee order so that files will be first then subdirectories,.. () because '.'.ord < '/'.ord (sort is also used in eager_load! https://github.com/rails/rails/blob/master/railties/lib/rails/engine.rb#L475)
- Loading branch information