Sha256: 59ad37f49fe55a5172ecd87a8a6772c52063f9365ba7473ac2cd5eb34a47c421

Contents?: true

Size: 729 Bytes

Versions: 13

Compression:

Stored size: 729 Bytes

Contents

# require 'spec_helper'

# describe Firehose::Broker do
#   include EM::TestHelper

#   let(:broker)  { Firehose::Broker.new }

#   it "should unsubscibe consumers and remove them from the collection" do
#     stats = nil

#     em do
#       broker.consumer('1').subscribe_to('/the-channel')
#       broker.consumer('2').subscribe_to('/the-channel')
#       broker.consumer('2').subscribe_to('/a-channel')

#       em.add_timer(1) do
#         stats = broker.stats
#         broker.stop
#         em.stop
#       end
#     end

#     stats.should == {
#       '1' => {'subscriptions' => ['/the-channel'] },
#       '2' => {'subscriptions' => ['/the-channel', '/a-channel']}
#     }

#     broker.stats.should == {}
#   end
# end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
firehose-1.1.1 spec/lib/broker_spec.rb
firehose-1.1.0 spec/lib/broker_spec.rb
firehose-1.0.0 spec/lib/broker_spec.rb
firehose-0.2.alpha.10 spec/lib/broker_spec.rb
firehose-0.2.alpha.9 spec/lib/broker_spec.rb
firehose-0.2.alpha.8 spec/lib/broker_spec.rb
firehose-0.2.alpha.7 spec/lib/broker_spec.rb
firehose-0.2.alpha.6 spec/lib/broker_spec.rb
firehose-0.2.alpha.5 spec/lib/broker_spec.rb
firehose-0.2.alpha.3 spec/lib/broker_spec.rb
firehose-0.2.alpha.2 spec/lib/broker_spec.rb
firehose-0.1.1 spec/lib/broker_spec.rb
firehose-0.1.0 spec/lib/broker_spec.rb