File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -184,11 +184,12 @@ def assertion_delegator
184184
185185 # @private
186186 module TaggedLoggingAdapter
187- require 'active_support/testing/tagged_logging'
188- include ActiveSupport ::Testing ::TaggedLogging
189-
190- # Just a stub as TaggedLogging is calling `name`
191- def name
187+ private
188+ # Vendored from activesupport/lib/active_support/testing/tagged_logging.rb
189+ # This implements the tagged_logger method where it is expected, but
190+ # doesn't call `name` or set it up like Rails does.
191+ def tagged_logger
192+ @tagged_logger ||= ( defined? ( Rails . logger ) && Rails . logger )
192193 end
193194 end
194195 end
Original file line number Diff line number Diff line change 11module RSpec ::Rails
22 RSpec . describe RailsExampleGroup do
33 if ::Rails ::VERSION ::MAJOR >= 7
4- it 'includes ActiveSupport::Testing::TaggedLogging' do
5- expect ( described_class . include? ( ::ActiveSupport ::Testing ::TaggedLogging ) ) . to eq ( true )
4+ it 'supports tagged_logger' do
65 expect ( described_class . private_instance_methods ) . to include ( :tagged_logger )
76 end
87 end
You can’t perform that action at this time.
0 commit comments