Sha256: e22ddd43a0155742e7c2131c1429ef4c9f5344a3d94541055f6f847b9704f79c
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' describe BigBrother::Configuration do describe '.evaluate' do it 'returns a hash of clusters' do clusters = BigBrother::Configuration.evaluate(TEST_CONFIG) clusters['test1'].check_interval.should == 1 clusters['test1'].scheduler.should == 'wrr' clusters['test1'].fwmark.should == 1 clusters['test2'].check_interval.should == 1 clusters['test2'].scheduler.should == 'wrr' clusters['test2'].fwmark.should == 2 clusters['test3'].check_interval.should == 1 clusters['test3'].scheduler.should == 'wrr' clusters['test3'].fwmark.should == 3 end it 'populates a clusters nodes' do clusters = BigBrother::Configuration.evaluate(TEST_CONFIG) clusters['test1'].nodes.length.should == 2 clusters['test1'].nodes[0].address == '127.0.0.1' clusters['test1'].nodes[0].port == '9001' clusters['test1'].nodes[0].path == '/test/valid' clusters['test1'].nodes[1].address == '127.0.0.1' clusters['test1'].nodes[1].port == '9002' clusters['test1'].nodes[1].path == '/test/valid' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
big_brother-0.4.1 | spec/big_brother/configuration_spec.rb |
big_brother-0.4.0 | spec/big_brother/configuration_spec.rb |