Sha256: 7c03889b6c83beb6fce556777e63752e5743d0468304ac31ef47fcc0d916255c

Contents?: true

Size: 419 Bytes

Versions: 13

Compression:

Stored size: 419 Bytes

Contents

require 'spec_helper'

module RedisFailover
  describe FailoverStrategy do

    describe '.for' do
      it 'creates a new latency strategy instance' do
        s = FailoverStrategy.for('latency')
        s.should be_a RedisFailover::FailoverStrategy::Latency
      end

      it 'rejects unknown strategies' do
        expect { FailoverStrategy.for('foobar') }.to raise_error(RuntimeError)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
spbtv_redis_failover-1.0.2.1 spec/failover_strategy_spec.rb
nogara-redis_failover-1.0.6 spec/failover_strategy_spec.rb
nogara-redis_failover-1.0.5 spec/failover_strategy_spec.rb
nogara-redis_failover-1.0.4 spec/failover_strategy_spec.rb
redis_failover-1.0.2 spec/failover_strategy_spec.rb
nogara-redis_failover-1.0.2 spec/failover_strategy_spec.rb
nogara-redis_failover-1.0.1 spec/failover_strategy_spec.rb
redis_failover-1.0.1 spec/failover_strategy_spec.rb
nogara-redis_failover-1.0.0 spec/failover_strategy_spec.rb
redis_failover-1.0.0 spec/failover_strategy_spec.rb
nogara-redis_failover-0.9.7.4 spec/failover_strategy_spec.rb
nogara-redis_failover-0.9.7.3 spec/failover_strategy_spec.rb
nogara-redis_failover-0.9.7.2 spec/failover_strategy_spec.rb