Sha256: b1878c48f0f18d32baec470966c4cbec465f2418516e8a53b6773da90bf4355a
Contents?: true
Size: 921 Bytes
Versions: 13
Compression:
Stored size: 921 Bytes
Contents
module RabbitFeed module TestingSupport describe TestingHelpers do describe 'consuming events' do accumulator = [] let(:define_route) do EventRouting do accept_from('some_place') do event('some_event') do |event| accumulator << event end end end end let(:payload) { {'stuff' => 'some_stuff'} } let(:metadata) { {'application' => 'some_place', 'name' => 'some_event'} } let(:event) { Event.new metadata, payload } before { define_route } it 'should allow to send messages directly to the consumer' do rabbit_feed_consumer.consume_event event expect(accumulator.size).to eq(1) expect(accumulator[0].payload).to eq(payload) expect(accumulator[0].metadata).to eq(metadata) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems