lib/fluffle/testing.rb in fluffle-0.6.1 vs lib/fluffle/testing.rb in fluffle-0.6.2

- old
+ new

@@ -51,20 +51,20 @@ def post(&block) block.call end end + DeliveryInfo = Struct.new(:delivery_tag) + # Fake RabbitMQ server presented through a subset of the `Bunny` # library's interface class Loopback # Singleton server instance that lives in the process def self.instance @instance ||= self.new end - attr_accessor :next_publish_seq_no - def initialize @queues = Concurrent::Map.new end def connection @@ -79,10 +79,10 @@ def publish(payload, opts) queue_name = opts[:routing_key] raise "Missing `:routing_key' in `#publish' opts" unless queue_name - delivery_info = nil + delivery_info = DeliveryInfo.new Random.rand(1000000) properties = { reply_to: opts[:reply_to], correlation_id: opts[:correlation_id] }