Skip to content

Commit 85618af

Browse files
committed
Remove obsolete ActiveRecord::ExplainSubscriber reference for Rails 8.1
Rails 8.1 removed the ExplainSubscriber class (commit f488878f1bc), causing test failures with: NameError: uninitialized constant ActiveRecord::ExplainSubscriber The ExplainSubscriber functionality was refactored into ExplainRegistry with lazy subscription - instead of subscribing at initialization, Rails 8.1 now subscribes only when .explain is first called via ExplainRegistry.start. The spec_helper.rb line that manually subscribed to ExplainSubscriber is no longer needed or valid. Rails 8.1 handles the subscription automatically and lazily. Related Rails commit: - f488878f1bc "Refactor ExplainRegistry to only be subscribed once used" - Author: Jean Boussier - Date: Thu Sep 25 10:37:09 2025 +0200 - Link: rails/rails@f488878
1 parent b36a5d4 commit 85618af

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

spec/spec_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def set_logger
5353
ActiveSupport::Notifications.notifier = @notifier
5454

5555
ActiveRecord::LogSubscriber.attach_to(:active_record)
56-
ActiveSupport::Notifications.subscribe("sql.active_record", ActiveRecord::ExplainSubscriber.new)
5756
end
5857

5958
class MockLogger

0 commit comments

Comments
 (0)