Skip to content

Commit

Permalink
Fix rails 6 spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
y9v committed Aug 19, 2024
1 parent aa3a655 commit 108627a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions spec/datadog/tracing/contrib/rails/support/rails6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,11 @@ def reset_rails_configuration!
# TODO: Remove this side-effect on missing log entries
Lograge.remove_existing_log_subscriptions if defined?(::Lograge)

if Module.const_defined?(:ActiveRecord)
reset_class_variable(ActiveRecord::Railtie::Configuration, :@@options)
reset_class_variable(ActiveRecord::Railtie::Configuration, :@@options) if Module.const_defined?(:ActiveRecord)

# After `deep_dup`, the sentinel `NULL_OPTION` is inadvertently changed. We restore it here.
if Rails::VERSION::MINOR < 1
ActiveRecord::Railtie.config.action_view.finalize_compiled_template_methods = ActionView::Railtie::NULL_OPTION
end
# After `deep_dup`, the sentinel `NULL_OPTION` is inadvertently changed. We restore it here.
if Rails::VERSION::MINOR < 1
ActionView::Railtie.config.action_view.finalize_compiled_template_methods = ActionView::Railtie::NULL_OPTION
end

reset_class_variable(ActiveSupport::Dependencies, :@@autoload_paths)
Expand Down

0 comments on commit 108627a

Please sign in to comment.