Sha256: dc784f8af60a8475d6cf316f5abab341820b4751498941c9e6c6ffd97b0426dd
Contents?: true
Size: 861 Bytes
Versions: 2
Compression:
Stored size: 861 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/" 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
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
enju_circulation-0.1.0.pre36 | spec/support/resque.rb |
enju_leaf-1.1.0.rc11 | spec/support/resque.rb |