aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/test_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb
index 2473cec384..d19aab1438 100644
--- a/activesupport/test/test_test.rb
+++ b/activesupport/test/test_test.rb
@@ -171,3 +171,18 @@ class SubclassSetupAndTeardownTest < SetupAndTeardownTest
assert_equal [:foo, :bar, :bar, :foo], @called_back
end
end
+
+
+class TestCaseTaggedLoggingTest < ActiveSupport::TestCase
+ def before_setup
+ require 'stringio'
+ @out = StringIO.new
+ self.tagged_logger = ActiveSupport::TaggedLogging.new(Logger.new(@out))
+ super
+ end
+
+ def test_logs_tagged_with_current_test_case
+ tagged_logger.info 'test'
+ assert_equal "[#{self.class.name}] [#{__name__}] test\n", @out.string
+ end
+end