1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_logger.rb: suppress a warning

* test/logger/test_logger.rb (test_datetime_format): suppress
  warning when strftime called with empty format string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-11-05 02:39:09 +00:00
parent 6f6a517635
commit a2f3069988

View file

@ -121,6 +121,7 @@ class TestLogger < Test::Unit::TestCase
end
def test_datetime_format
verbose, $VERBOSE = $VERBOSE, false
dummy = STDERR
logger = Logger.new(dummy)
log = log_add(logger, INFO, "foo")
@ -131,6 +132,8 @@ class TestLogger < Test::Unit::TestCase
logger.datetime_format = ""
log = log_add(logger, INFO, "foo")
assert_match(/^$/, log.datetime)
ensure
$VERBOSE = verbose
end
def test_formatter