diff --git a/config/initializers/000-development_reload_warnings.rb b/config/initializers/000-development_reload_warnings.rb index f6901bd6f24..bc7acc57851 100644 --- a/config/initializers/000-development_reload_warnings.rb +++ b/config/initializers/000-development_reload_warnings.rb @@ -21,7 +21,8 @@ if Rails.env.development? && !Rails.configuration.cache_classes && Discourse.run not_autoloaded = files.filter_map do |file| autoloaded = Rails.autoloaders.main.__autoloads.key? file - if !autoloaded && !file.end_with?("spec.rb") + + if !autoloaded && !file.match(%r{/spec/}) Pathname.new(file).relative_path_from(Rails.root) end end