Sha256: 07b6dceabeebd93c3e1a8be2b0377545c6a7119f86fc2daa8b795666a53df785

Contents?: true

Size: 508 Bytes

Versions: 7

Compression:

Stored size: 508 Bytes

Contents

require_relative '../../spec_helper'

module NonRailsApp
  describe 'Event Routing' do
    let(:payload)  { {'field' => 'value'} }
    let(:metadata) { {'application' => 'rails_app', 'name' => 'user_creates_beaver'} }
    let(:event)    { RabbitFeed::Event.new metadata, payload }

    it 'routes events correctly' do
      expect(NonRailsApp::EventHandler).to receive(:handle_event) { |full_event| expect(full_event.payload).to eq(payload)}
      rabbit_feed_consumer.consume_event(event)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rabbit_feed-2.3.1 example/non_rails_app/spec/lib/non_rails_app/event_routing_spec.rb
rabbit_feed-2.3.0 example/non_rails_app/spec/lib/non_rails_app/event_routing_spec.rb
rabbit_feed-2.1.5 example/non_rails_app/spec/lib/non_rails_app/event_routing_spec.rb
rabbit_feed-2.1.2 example/non_rails_app/spec/lib/non_rails_app/event_routing_spec.rb
rabbit_feed-2.1.1 example/non_rails_app/spec/lib/non_rails_app/event_routing_spec.rb
rabbit_feed-2.1.0 example/non_rails_app/spec/lib/non_rails_app/event_routing_spec.rb
rabbit_feed-2.0.0 example/non_rails_app/spec/lib/non_rails_app/event_routing_spec.rb