From 803008eb97487614e865ba3428ca2658dc11901b Mon Sep 17 00:00:00 2001 From: Wolfram Arnold Date: Wed, 17 Jul 2013 18:19:13 -0700 Subject: 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. --- activesupport/test/tagged_logging_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/test/tagged_logging_test.rb') 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 -- cgit v1.2.3