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

Version Path
enju_leaf-1.3.6 spec/support/resque.rb
enju_leaf-1.3.5 spec/support/resque.rb
enju_leaf-1.3.4 spec/support/resque.rb
enju_leaf-1.3.4.rc.2 spec/support/resque.rb
enju_leaf-1.3.4.rc.1 spec/support/resque.rb
enju_leaf-2.0.0.beta.2 spec/support/resque.rb
enju_leaf-2.0.0.beta.1 spec/support/resque.rb
enju_leaf-1.3.3.1 spec/support/resque.rb
enju_leaf-1.3.3 spec/support/resque.rb
enju_circulation-0.3.3 spec/support/resque.rb
enju_circulation-0.3.2 spec/support/resque.rb
enju_event-0.3.2 spec/support/resque.rb
enju_leaf-1.3.2 spec/support/resque.rb
enju_circulation-0.3.1 spec/support/resque.rb
enju_leaf-1.3.1 spec/support/resque.rb
enju_biblio-0.3.1 spec/support/resque.rb
enju_event-0.3.1 spec/support/resque.rb
enju_leaf-1.3.0 spec/support/resque.rb
enju_circulation-0.3.0 spec/support/resque.rb
enju_event-0.3.0 spec/support/resque.rb