Skip to content

Commit

Permalink
Explicitly require logger in test_helper
Browse files Browse the repository at this point in the history
Suites related to Rails 6.0, 6.1 and 7.0 started to fail with an
uninitialized constant error related to the Logger::Severity contstant.
  • Loading branch information
kaylareopelle committed Jan 16, 2025
1 parent d772cd3 commit cd65116
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ module NewRelic; TEST = true; end unless defined? NewRelic::TEST
$: << File.expand_path('../../test', __FILE__)
$:.uniq!

# TODO: OLD RAILS - 6.0, 6.1, 7.0
# Suites related to these versions started failing because of an uninitialized
# constant error related to Logger::Severity, regardless of Ruby version.
# Explicitly requiring 'logger' seems to fix the problem
# We can remove this workaround when we drop support for these Rails versions
require 'logger'
require 'rubygems'
require 'rake'

Expand Down

0 comments on commit cd65116

Please sign in to comment.