Browse files

Change temp directory when running test

Dir.tmpdir methods returns the generic temp directory (usually /tmp). The method was assuming that that directoy can be used to store the
volatile MongoDB instance created to run the test.

This commit use a subdirectory, so there is no conflic with other temp files.
  • Loading branch information...
1 parent 8da3711 commit c426ef31c5d7e31fe16690e8257d5f5b8da63e59 @ayosec ayosec committed with Sep 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Rakefile
@@ -15,7 +15,7 @@ task :default => 'spec:integration:default'
class MongoRunner
auth = "--auth" if options[:auth]
- dir = Dir.tmpdir
+ dir = Dir.tmpdir + "/em-mongo-tests-#$$"
FileUtils.rm_r Dir.glob("#{dir}/*") unless options[:noclean]
pidf = "#{dir}/"
logf = "#{dir}/mongo.log"

0 comments on commit c426ef3

Please sign in to comment.