test/test_helper.rb in resque-cleaner-0.2.11 vs test/test_helper.rb in resque-cleaner-0.2.12

- old
+ new

@@ -29,11 +29,10 @@ # # start our own redis when the tests start, # kill it when they end # - at_exit do next if $! if defined?(MiniTest) exit_code = MiniTest::Unit.new.run(ARGV) @@ -41,11 +40,12 @@ exit_code = Test::Unit::AutoRunner.run end pid = `ps -A -o pid,command | grep [r]edis-test`.split(" ")[0] puts "Killing test redis server..." - `rm -f #{dir}/dump.rdb` Process.kill("KILL", pid.to_i) + dump = "test/dump.rdb" + File.delete(dump) if File.exist?(dump) exit exit_code end puts "Starting redis for testing at localhost:9736..." `redis-server #{dir}/redis-test.conf`