Sha256: 079a9ca908ba6fb522d5c3867a9f6f6dc8c74f200f25ac7b76b853657d692dae
Contents?: true
Size: 799 Bytes
Versions: 3
Compression:
Stored size: 799 Bytes
Contents
require 'spec_helper' 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(:event) { {'application' => 'some_place', 'name' => 'some_event', 'stuff' => 'some_stuff'} } 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(event) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems