Sha256: 5f00eaca1bcc17c71c707396146a06544db207ea540c10c31573bc54445385cc
Contents?: true
Size: 646 Bytes
Versions: 13
Compression:
Stored size: 646 Bytes
Contents
require 'spec_helper' module RedisFailover class NodeStrategy NodeStrategy.for(:single) describe Single do let(:node) { Node.new(:host => 'localhost', :port => '123') } let(:snapshot) { NodeSnapshot.new(node) } describe '#determine_state' do it 'returns the unavailable state if any node manager reports as down' do strategy = NodeStrategy.for(:single) snapshot.unviewable_by('nm1') snapshot.viewable_by('nm2', 0) snapshot.viewable_by('nm3', 0) strategy.determine_state(node, node => snapshot).should == :unavailable end end end end end
Version data entries
13 entries across 13 versions & 3 rubygems