File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -184,11 +184,12 @@ def assertion_delegator
184
184
185
185
# @private
186
186
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 )
192
193
end
193
194
end
194
195
end
Original file line number Diff line number Diff line change 1
1
module RSpec ::Rails
2
2
RSpec . describe RailsExampleGroup do
3
3
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
6
5
expect ( described_class . private_instance_methods ) . to include ( :tagged_logger )
7
6
end
8
7
end
You can’t perform that action at this time.
0 commit comments