Sha256: cac2d03836ac4a266e27493ceff844afbcec84c1bed0eddc1e1ee5b3ebad1bd9
Contents?: true
Size: 671 Bytes
Versions: 13
Compression:
Stored size: 671 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' module OnStomp::Failover::Pools describe RoundRobin, :failover => true do let(:clients) { [ '1', '2', '3'] } let(:pool) { RoundRobin.new([]).tap do |p| p.stub(:clients => clients) end } describe ".next_client" do it "should return clients in order and cycle" do pool.next_client.should == '1' pool.next_client.should == '2' pool.next_client.should == '3' pool.next_client.should == '1' pool.next_client.should == '2' pool.next_client.should == '3' pool.next_client.should == '1' end end end end
Version data entries
13 entries across 13 versions & 1 rubygems