From 4265f1bccbabc293e87cc8433a5573dcb7fa5a60 Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Thu, 10 Jan 2013 13:36:05 -0500 Subject: Incorrectly providing program name the same as log message even when block is not provided. --- activesupport/test/tagged_logging_test.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'activesupport/test') diff --git a/activesupport/test/tagged_logging_test.rb b/activesupport/test/tagged_logging_test.rb index 7253eb1222..91c311ba16 100644 --- a/activesupport/test/tagged_logging_test.rb +++ b/activesupport/test/tagged_logging_test.rb @@ -4,14 +4,24 @@ require 'active_support/tagged_logging' class TaggedLoggingTest < ActiveSupport::TestCase class MyLogger < ::Logger + attr_accessor :last_message + attr_accessor :last_progname + def flush(*) info "[FLUSHED]" end + + def add(severity, message = nil, progname = nil, &block) + @last_message = message + @last_progname = progname + super(severity, message, progname, &block) + end end setup do @output = StringIO.new - @logger = ActiveSupport::TaggedLogging.new(MyLogger.new(@output)) + @my_logger = MyLogger.new(@output) + @logger = ActiveSupport::TaggedLogging.new(@my_logger) end test "tagged once" do -- cgit v1.2.3