aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/tagged_logging_test.rb
diff options
context:
space:
mode:
authorWolfram Arnold <wolfram@handl.it>2013-07-17 18:19:13 -0700
committerWolfram Arnold <wolfram@handl.it>2013-07-17 18:26:55 -0700
commit803008eb97487614e865ba3428ca2658dc11901b (patch)
treec85d0a525b5010aefe3c10854848765e1d39d382 /activesupport/test/tagged_logging_test.rb
parentfc0faaa5905eab7f2a70b1d5b5aa06bd7b43d7fd (diff)
downloadrails-803008eb97487614e865ba3428ca2658dc11901b.tar.gz
rails-803008eb97487614e865ba3428ca2658dc11901b.tar.bz2
rails-803008eb97487614e865ba3428ca2658dc11901b.zip
Add respond_to_missing? for TaggedLogging which is needed if another log abstracter wraps a TaggedLogging instance.
It's also best practice when overriding method_missing.
Diffstat (limited to 'activesupport/test/tagged_logging_test.rb')
-rw-r--r--activesupport/test/tagged_logging_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/tagged_logging_test.rb b/activesupport/test/tagged_logging_test.rb
index 91c311ba16..89417ac5cb 100644
--- a/activesupport/test/tagged_logging_test.rb
+++ b/activesupport/test/tagged_logging_test.rb
@@ -66,6 +66,10 @@ class TaggedLoggingTest < ActiveSupport::TestCase
assert_equal "[BCX] Funky time\n", @output.string
end
+ test "correctly answers responds_to_missing? for methods on logger instance" do
+ assert @logger.respond_to?(:debug?)
+ 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