Sha256: cb29bac2a84b9edf5cbb3ff96106e2e0cc05d2d4681b5499ebbc5a28da63e7d4
Contents?: true
Size: 857 Bytes
Versions: 16
Compression:
Stored size: 857 Bytes
Contents
require 'spec_helper' describe 'Roqua::StatusChecks::CheckLoadBalancerMember' do it 'returns true when the status file contains on' do allow(File).to receive(:read).and_return('on') expect(Roqua::StatusChecks::CheckLoadBalancerMember.balancer_member?('foo/bar')).to be_truthy end it 'returns false when the status file does not contain off' do allow(File).to receive(:read).and_return('off') expect(Roqua::StatusChecks::CheckLoadBalancerMember.balancer_member?('foo/bar')).to be_falsey end it 'raises InvalidStatus error when the status file contains something else' do allow(File).to receive(:read).and_return('foo') expect { Roqua::StatusChecks::CheckLoadBalancerMember.balancer_member?('foo/bar') } .to raise_error(Roqua::StatusChecks::CheckLoadBalancerMember::InvalidStatus, 'Invalid state: foo') end end
Version data entries
16 entries across 16 versions & 1 rubygems