Sha256: 1e3b8c82f58ec62d9b544c8476bb66c7921bc6312e0834919edf3168d7cb1957
Contents?: true
Size: 747 Bytes
Versions: 7
Compression:
Stored size: 747 Bytes
Contents
require_relative 'spec_helper' describe 'Services::Service' do let(:c) { Services::Connection.new host: 'localhost' } let(:m1) { Services::Member.new 'test_member', service: 'test', ip: '127.0.0.2', port: 80, weight: 20 } let(:m2) { Services::Member.new 'test_member2', service: 'test', ip: '127.0.0.3', port: 80, weight: 20 } it 'should load the test service' do Services::Connection.new host: 'localhost' members = Services::Service.new('test').members members.length.should eql 2 members[0].to_hash.should eql m1.to_hash members[1].to_hash.should eql m2.to_hash end it 'should handle non-existant services' do a = Services::Service.new 'should_not_exist' a.name.should eql 'should_not_exist' end end
Version data entries
7 entries across 7 versions & 1 rubygems