Sha256: 8e88652da6ba2ea0721c5a85c0b7c3312cfa97e3d736028a10dcf6de0e61e644
Contents?: true
Size: 755 Bytes
Versions: 16
Compression:
Stored size: 755 Bytes
Contents
require 'spec_helper' require 'hamster/experimental/mutable_set' describe 'Tapping into with group identifier' do let(:deliverer) { Freddy.build(logger, config) } let(:responder1) { Freddy.build(logger, config) } let(:responder2) { Freddy.build(logger, config) } let(:destination) { random_destination } after { [deliverer, responder1, responder2].each(&:close) } it 'receives a message once' do msg_counter = Hamster::MutableSet[] group_id = arbitrary_id responder1.tap_into(destination, group: group_id) {|msg| msg_counter << 'r1' } responder2.tap_into(destination, group: group_id) {|msg| msg_counter << 'r2' } deliverer.deliver(destination, {}) default_sleep expect(msg_counter.count).to eq(1) end end
Version data entries
16 entries across 16 versions & 2 rubygems