Skip to content

Commit cac4c60

Browse files
p-mongop
andcommitted
Fix ActiveSupport loading.
Cherry-picked from df9cdae: RUBY-2834 support rails 7.0 (#2399) * RUBY-2834 support rails 7.0 * fix as require Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 349e5ca commit cac4c60

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/lite_spec_helper.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,13 @@ class ExampleTimeout < StandardError; end
157157
end
158158

159159
if SpecConfig.instance.active_support?
160+
require "active_support/version"
161+
if ActiveSupport.version >= Gem::Version.new(7)
162+
# ActiveSupport wants us to require ALL of it all of the time.
163+
# See: https://github.com/rails/rails/issues/43851,
164+
# https://github.com/rails/rails/issues/43889, etc.
165+
require 'active_support'
166+
end
160167
require "active_support/time"
161168
require 'mongo/active_support'
162169
end

0 commit comments

Comments
 (0)