Sha256: 6be43d451eb65699601941558b6ca121247da78efa2c1a9c14829d2846ebf640
Contents?: true
Size: 598 Bytes
Versions: 13
Compression:
Stored size: 598 Bytes
Contents
# frozen_string_literal: true module Rabbit::TestHelpers def send_rabbit_message(sender_id, event, data) Rabbit::Receiving::Worker.new.work_with_params(data.to_json, {}, type: event, app_id: sender_id) end def expect_rabbit_message(args, strict: true) expectation = if strict args else -> (received_args) { expect(received_args).to match(args) } end expect(Rabbit).to receive(:publish).with(expectation).once end def expect_no_rabbit_messages expect(Rabbit).not_to receive(:publish) end end
Version data entries
13 entries across 13 versions & 1 rubygems