From 55ee4d17586e25471ec51e8ca40fa423077dc036 Mon Sep 17 00:00:00 2001 From: zaru Date: Tue, 30 Jan 2024 14:09:50 +0900 Subject: [PATCH] Fix: Rails top-level calling and cache_classes loading method --- lib/rspec/daemon.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/daemon.rb b/lib/rspec/daemon.rb index 215c3b2..0e2e397 100644 --- a/lib/rspec/daemon.rb +++ b/lib/rspec/daemon.rb @@ -67,7 +67,7 @@ def reset # Reload configuration from the first time cached_config.replay_configuration # Invoke auto reload (if Rails is in Zeitwerk mode and autoloading is enabled) - if defined?(::Rails) && Rails.respond_to?(:autoloaders) && !::Rails.configuration.cache_classes? + if defined?(::Rails) && ::Rails.respond_to?(:autoloaders) && !::Rails.configuration.cache_classes puts "Reloading..." ::Rails.autoloaders.main.reload end