Sha256: 365928ce1bec14d1e83185686d672f5b9c03dcc04e16a558b0444d7794994cf3
Contents?: true
Size: 663 Bytes
Versions: 13
Compression:
Stored size: 663 Bytes
Contents
require 'spec_helper' module RedisFailover class NodeStrategy NodeStrategy.for(:majority) describe Majority do let(:node) { Node.new(:host => 'localhost', :port => '123') } let(:snapshot) { NodeSnapshot.new(node) } describe '#determine_state' do it 'returns the unavailable state if unavailable by the majority of node managers' do strategy = NodeStrategy.for(:majority) snapshot.viewable_by('nm1', 0) snapshot.unviewable_by('nm2') snapshot.unviewable_by('nm3') strategy.determine_state(node, node => snapshot).should == :unavailable end end end end end
Version data entries
13 entries across 13 versions & 3 rubygems