aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/tagged_logging_test.rb
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2011-10-21 15:12:00 +0530
committerArun Agrawal <arunagw@gmail.com>2011-10-21 16:11:09 +0530
commitc495cbcda94bec7a49a88631fc575cc04bde8e88 (patch)
tree73b041f522e473249d34b3f1b8ba8a9edfa834da /activesupport/test/tagged_logging_test.rb
parentaf1b5c54cfb74caddd6ffab171d26da9a5c885d1 (diff)
downloadrails-c495cbcda94bec7a49a88631fc575cc04bde8e88.tar.gz
rails-c495cbcda94bec7a49a88631fc575cc04bde8e88.tar.bz2
rails-c495cbcda94bec7a49a88631fc575cc04bde8e88.zip
Checking blank if tag might coming nil or blank
In log it should not show the empty array.
Diffstat (limited to 'activesupport/test/tagged_logging_test.rb')
-rw-r--r--activesupport/test/tagged_logging_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/tagged_logging_test.rb b/activesupport/test/tagged_logging_test.rb
index b12b12f32c..17c4214dfc 100644
--- a/activesupport/test/tagged_logging_test.rb
+++ b/activesupport/test/tagged_logging_test.rb
@@ -29,6 +29,11 @@ class TaggedLoggingTest < ActiveSupport::TestCase
assert_equal "[BCX] [Jason] [New] Funky time\n", @output.string
end
+ test "tagged once with blank and nil" do
+ @logger.tagged(nil, "", "New") { @logger.info "Funky time" }
+ assert_equal "[New] Funky time\n", @output.string
+ end
+
test "keeps each tag in their own thread" do
@logger.tagged("BCX") do
Thread.new do