spec/spec_helper.rb in redis-objects-0.5.3 vs spec/spec_helper.rb in redis-objects-0.6.0
- old
+ new
@@ -1,7 +1,7 @@
require 'rubygems' # poor people still on 1.8
-gem 'redis', '>= 2.1.1'
+gem 'redis', '>= 3.0.0'
require 'redis'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
require 'bacon'
Bacon.summary_at_exit
@@ -26,10 +26,11 @@
at_exit do
pid = File.read(REDIS_PID).to_i
puts "=> Killing #{REDIS_BIN} with pid #{pid}"
Process.kill "TERM", pid
Process.kill "KILL", pid
- File.unlink REDIS_PID, REDIS_DUMP
+ File.unlink REDIS_PID
+ File.unlink REDIS_DUMP if File.exists? REDIS_DUMP
end
# Grab a global handle
$redis = Redis.new(:host => REDIS_HOST, :port => REDIS_PORT)