aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tc_mauve_configuration_builders_logger.rb7
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