Sha256: 30ce56aa0fb5f04faa83a2aa917e8a6326baeb0d1d35a35b4d7f395af72b43b8
Contents?: true
Size: 936 Bytes
Versions: 8
Compression:
Stored size: 936 Bytes
Contents
require 'rabbit_feed/testing_support/rspec_matchers/publish_event' require 'rabbit_feed/testing_support/test_rabbit_feed_consumer' require 'rabbit_feed/testing_support/testing_helpers' module RabbitFeed module TestingSupport extend self attr_accessor :published_events def setup rspec_config capture_published_events rspec_config include_support rspec_config end def capture_published_events rspec_config rspec_config.before :each do TestingSupport.published_events = [] allow(RabbitFeed::ProducerConnection).to receive(:publish) do |serialized_event, routing_key| TestingSupport.published_events << (Event.deserialize serialized_event) end end end def include_support rspec_config rspec_config.include(RabbitFeed::TestingSupport::RSpecMatchers) rspec_config.include(RabbitFeed::TestingSupport::TestingHelpers) end end end
Version data entries
8 entries across 8 versions & 1 rubygems