class Lapine::Test::FakeExchange
Attributes
histories[R]
Public Class Methods
new()
click to toggle source
# File lib/lapine/test/exchange.rb, line 18 def initialize @histories = [] end
Public Instance Methods
bind(history)
click to toggle source
# File lib/lapine/test/exchange.rb, line 26 def bind(history) histories << history end
channel()
click to toggle source
# File lib/lapine/test/exchange.rb, line 22 def channel @channel ||= FakeChannel.new end
publish(body, routing_key = nil)
click to toggle source
# File lib/lapine/test/exchange.rb, line 30 def publish(body, routing_key = nil) histories.each do |h| h.publish(body, routing_key) end end