Sha256: 4b9b38a89fbcfee7cd745479856b501a9777f431e3bbe2cd485e23306a600654
Contents?: true
Size: 936 Bytes
Versions: 43
Compression:
Stored size: 936 Bytes
Contents
# https://github.com/resque/resque/wiki/RSpec-and-Resque RSpec.configure do |config| REDIS_PID = "#{Rails.root}/tmp/pids/redis-test.pid" REDIS_CACHE_PATH = "#{Rails.root}/tmp/cache/" unless ENV["TRAVIS"] config.before(:suite) do redis_options = { "daemonize" => 'yes', "pidfile" => REDIS_PID, "port" => 9736, "timeout" => 300, "save 900" => 1, "save 300" => 1, "save 60" => 10000, "dbfilename" => "dump.rdb", "dir" => REDIS_CACHE_PATH, "loglevel" => "debug", "logfile" => "stdout", "databases" => 16 }.map { |k, v| "#{k} #{v}" }.join("\n") `echo '#{redis_options}' | redis-server -` end config.after(:suite) do %x{ cat #{REDIS_PID} | xargs kill -QUIT rm -f #{REDIS_CACHE_PATH}dump.rdb } end end end
Version data entries
43 entries across 43 versions & 4 rubygems