From 811663b6407d5e38e38b7754d001dddd81fd2641 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Tue, 30 Jan 2024 16:19:24 -0500 Subject: [PATCH] rubocop --- spec/datadog/tracing/contrib/active_record/app.rb | 8 ++++++-- .../tracing/contrib/active_record/instantiation_spec.rb | 6 +----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/datadog/tracing/contrib/active_record/app.rb b/spec/datadog/tracing/contrib/active_record/app.rb index 7956565350a..48e8ff9386c 100644 --- a/spec/datadog/tracing/contrib/active_record/app.rb +++ b/spec/datadog/tracing/contrib/active_record/app.rb @@ -10,8 +10,12 @@ if ActiveRecord::VERSION::MAJOR < 4 require 'active_record/connection_adapters/mysql2_adapter' - class ActiveRecord::ConnectionAdapters::Mysql2Adapter - NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY" + module ActiveRecord + module ConnectionAdapters + class Mysql2Adapter + NATIVE_DATABASE_TYPES[:primary_key] = 'int(11) auto_increment PRIMARY KEY' + end + end end end end diff --git a/spec/datadog/tracing/contrib/active_record/instantiation_spec.rb b/spec/datadog/tracing/contrib/active_record/instantiation_spec.rb index 2e330afbefb..f90a8d5bee5 100644 --- a/spec/datadog/tracing/contrib/active_record/instantiation_spec.rb +++ b/spec/datadog/tracing/contrib/active_record/instantiation_spec.rb @@ -13,12 +13,8 @@ before do if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new('4.2') - skip "ActiveRecord instantiation events were added in Rails 4.2" + skip 'ActiveRecord instantiation events were added in Rails 4.2' end - end - - before do - # Create the article to be retrieved in the tests. Article.create!(title: 'test') # Reset options (that might linger from other tests)