aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/clean_logger_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 18:25:30 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 18:25:30 +0000
commit05f173e2c2607e38cc4f86d53fbba8c832082208 (patch)
treec904b189e718ea5378b813b6651537bef1c87b9e /activesupport/test/clean_logger_test.rb
parent2a34e082f3262a9a934b8794737dab87b80d8fdd (diff)
downloadrails-05f173e2c2607e38cc4f86d53fbba8c832082208.tar.gz
rails-05f173e2c2607e38cc4f86d53fbba8c832082208.tar.bz2
rails-05f173e2c2607e38cc4f86d53fbba8c832082208.zip
Added call to inspect on non-string classes for the logger (closes #8533) [codahale]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/clean_logger_test.rb')
-rw-r--r--activesupport/test/clean_logger_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/clean_logger_test.rb b/activesupport/test/clean_logger_test.rb
index cf7b5c6036..5c9c8f9147 100644
--- a/activesupport/test/clean_logger_test.rb
+++ b/activesupport/test/clean_logger_test.rb
@@ -48,4 +48,10 @@ class CleanLoggerTest < Test::Unit::TestCase
assert_equal "%Y-%m-%d", @logger.datetime_format
assert_match(/D, \[\d\d\d\d-\d\d-\d\d#\d+\] DEBUG -- : debug/, @out.string)
end
+
+ def test_nonstring_formatting
+ an_object = [1, 2, 3, 4, 5]
+ @logger.debug an_object
+ assert_equal("#{an_object.inspect}\n", @out.string)
+ end
end