Sha256: 221b340c9f5d468cfe54b07745aa8678a3626a97d01895d051ee86637b3f26e3

Contents?: true

Size: 455 Bytes

Versions: 8

Compression:

Stored size: 455 Bytes

Contents

module TestRedis
  class Server
    def self.start!(dir)
      at_exit do
        pid = `ps -A -o pid,command | grep [r]edis-spec`.split(" ")[0]
        puts "Killing test redis server..."
        `rm -f #{dir}/dump.rdb`
        Process.kill("KILL", pid.to_i)
        exit $!.status
      end

      puts "Starting redis for testing at localhost:9736..."
      `redis-server #{dir}/redis-spec.conf`
      Seymour.redis = 'localhost:9736'
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
seymour-0.0.9 spec/support/redis.rb
seymour-0.0.8 spec/support/redis.rb
seymour-0.0.7 spec/support/redis.rb
seymour-0.0.6 spec/support/redis.rb
seymour-0.0.5 spec/support/redis.rb
seymour-0.0.4 spec/support/test_redis.rb
seymour-0.0.3 spec/support/test_redis.rb
seymour-0.0.2 spec/support/test_redis.rb