aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-05-02 10:15:52 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-05-02 10:15:52 +0100
commite6c1341540eb4c08b1cbfef46cf2360489b27bd0 (patch)
treeedd5b0414a0bc280b9ffab5da2458f6688b9df79
parent9caa15360effe79b84197fd68fc22996b64e35aa (diff)
Don't generate spurious files.
-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