Sha256: 0eb80b009ccc8da6a041004eac0ce46dddeef19559ea44fedc7a32534d5743ff

Contents?: true

Size: 499 Bytes

Versions: 15

Compression:

Stored size: 499 Bytes

Contents

require 'spec_helper'
require 'flapjack/redis_pool'

describe Flapjack::RedisPool do

  it "is initialized, and emptied" do
    EM.synchrony do
      redis_count = 3

      redis_conns = redis_count.times.collect {
        redis = mock('redis')
        redis.should_receive(:quit)
        redis
      }
      ::Redis.should_receive(:new).exactly(redis_count).times.and_return(*redis_conns)

      frp = Flapjack::RedisPool.new(:size => redis_count)
      frp.empty!

      EM.stop
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
flapjack-0.6.53 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.52 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.51 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.50 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.49 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.48 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.47 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.46 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.45 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.44 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.43 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.42 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.41 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.40 spec/lib/flapjack/redis_pool_spec.rb
flapjack-0.6.39 spec/lib/flapjack/redis_pool_spec.rb