diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-06-22 23:09:11 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-06-22 23:09:11 +0000 |
commit | 3bf3042a6cd29fd3ccc18541e84ea8ca5c791889 (patch) | |
tree | 3f1dac05c4b0e8f90c0ce7459061e6611f58a73a /activesupport/test | |
parent | e682fee121ed4c48b94e0afea887370c16e15d05 (diff) | |
download | rails-3bf3042a6cd29fd3ccc18541e84ea8ca5c791889.tar.gz rails-3bf3042a6cd29fd3ccc18541e84ea8ca5c791889.tar.bz2 rails-3bf3042a6cd29fd3ccc18541e84ea8ca5c791889.zip |
Ensure clean_logger fixes are 1.8.2 compatible [mislav] Closes #8396
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/clean_logger_test.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/activesupport/test/clean_logger_test.rb b/activesupport/test/clean_logger_test.rb index ce48107242..b972869c90 100644 --- a/activesupport/test/clean_logger_test.rb +++ b/activesupport/test/clean_logger_test.rb @@ -48,40 +48,3 @@ class CleanLoggerTest < Test::Unit::TestCase assert_match(/D, \[\d\d\d\d-\d\d-\d\d#\d+\] DEBUG -- : debug/, @out.string) end end - -class CleanLogger_182_to_183_Test < Test::Unit::TestCase - def setup - silence_warnings do - if Logger.method_defined?(:formatter=) - Logger.send(:alias_method, :hide_formatter=, :formatter=) - Logger.send(:undef_method, :formatter=) - else - Logger.send(:define_method, :formatter=) { } - end - load File.dirname(__FILE__) + '/../lib/active_support/clean_logger.rb' - end - - @out = StringIO.new - @logger = Logger.new(@out) - @logger.progname = 'CLEAN LOGGER TEST' - end - - def teardown - silence_warnings do - if Logger.method_defined?(:hide_formatter=) - Logger.send(:alias_method, :formatter=, :hide_formatter=) - else - Logger.send(:undef_method, :formatter=) - end - load File.dirname(__FILE__) + '/../lib/active_support/clean_logger.rb' - end - end - - # Since we've fooled Logger into thinking we're on 1.8.2 if we're on 1.8.3 - # and on 1.8.3 if we're on 1.8.2, it'll define format_message with the - # wrong order of arguments and therefore print progname instead of msg. - def test_format_message_with_faked_version - @logger.error 'error' - assert_equal "CLEAN LOGGER TEST\n", @out.string - end -end |