diff --git a/spec/dummy_app/config/application.rb b/spec/dummy_app/config/application.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy_app/config/application.rb
+++ b/spec/dummy_app/config/application.rb
@@ -41,7 +41,7 @@ module DummyApp
     config.i18n.load_path += Dir[Rails.root.join('app', 'locales', '*.{rb,yml}').to_s]
     if CI_ORM == :active_record
       config.active_record.time_zone_aware_types = %i[datetime time]
-      config.active_record.yaml_column_permitted_classes = [Symbol] if config.active_record.respond_to?(:yaml_column_permitted_classes=)
+      config.active_record.yaml_column_permitted_classes = [Symbol] if [ActiveRecord::Base, ActiveRecord].any? { |klass| klass.respond_to?(:yaml_column_permitted_classes=) }
     end
     config.active_storage.service = :local if defined?(ActiveStorage)
     config.active_storage.replace_on_assign_to_many = false if defined?(ActiveStorage) && ActiveStorage.version < Gem::Version.create('6.1')
Fix dummy_app failing to start with old version of ActiveRecord