diff options
Diffstat (limited to 'activesupport/test/tagged_logging_test.rb')
-rw-r--r-- | activesupport/test/tagged_logging_test.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activesupport/test/tagged_logging_test.rb b/activesupport/test/tagged_logging_test.rb index 87940472b4..cff73472c3 100644 --- a/activesupport/test/tagged_logging_test.rb +++ b/activesupport/test/tagged_logging_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "abstract_unit" require "active_support/logger" require "active_support/tagged_logging" @@ -20,7 +22,7 @@ class TaggedLoggingTest < ActiveSupport::TestCase other_logger = ActiveSupport::TaggedLogging.new(logger) assert_not_nil other_logger.formatter - assert other_logger.formatter.respond_to?(:tagged) + assert_respond_to other_logger.formatter, :tagged end test "tagged once" do @@ -73,11 +75,12 @@ class TaggedLoggingTest < ActiveSupport::TestCase test "keeps each tag in their own thread" do @logger.tagged("BCX") do Thread.new do + @logger.info "Dull story" @logger.tagged("OMG") { @logger.info "Cool story" } end.join @logger.info "Funky time" end - assert_equal "[OMG] Cool story\n[BCX] Funky time\n", @output.string + assert_equal "Dull story\n[OMG] Cool story\n[BCX] Funky time\n", @output.string end test "keeps each tag in their own instance" do |