diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-05-02 15:24:22 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-05-02 15:24:22 +0100 |
commit | 2e0b89b33d4c9944440bba49e6926a51b46d02c3 (patch) | |
tree | 2a28075d9b7459b469afb1988572cb61f4221881 /test/tc_mauve_configuration_builders_logger.rb | |
parent | e55096b063720e0be4ca8d774095d2f6dfb7c086 (diff) | |
parent | c697cea61321a8b292b4e353afc9dbff8a552b94 (diff) |
merge
Diffstat (limited to 'test/tc_mauve_configuration_builders_logger.rb')
-rw-r--r-- | test/tc_mauve_configuration_builders_logger.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/tc_mauve_configuration_builders_logger.rb b/test/tc_mauve_configuration_builders_logger.rb index 2d2bb80..14df0d8 100644 --- a/test/tc_mauve_configuration_builders_logger.rb +++ b/test/tc_mauve_configuration_builders_logger.rb @@ -2,6 +2,7 @@ $:.unshift "../lib/" require 'th_mauve' require 'mauve/configuration_builders/logger' +require 'tempfile' class TcMauveConfigurationBuildersLogger < Mauve::UnitTest @@ -10,6 +11,8 @@ class TcMauveConfigurationBuildersLogger < Mauve::UnitTest def test_load + test_log = Tempfile.new(self.class.to_s) + config=<<EOF logger { default_format "%d [ %l ] [ %12.12c ] %m" @@ -19,7 +22,7 @@ logger { outputter ("file") { trunc false - filename "test.conf" + filename "#{test_log.path}" level DEBUG } @@ -46,7 +49,7 @@ EOF assert_equal("%d [ %l ] [ %12.12c ] %m", outputter.formatter.pattern ) assert_equal(Log4r::DEBUG, outputter.level ) assert_equal(false, outputter.trunc ) - assert_equal("test.conf", outputter.filename ) + assert_equal(test_log.path, outputter.filename ) end def test_levels |