Class: Bunny::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/bunny/testing.rb

Instance Method Summary collapse

Instance Method Details

#basic_publish(payload, exchange, routing_key, opts = {}) ⇒ Object



68
69
70
# File 'lib/bunny/testing.rb', line 68

def basic_publish(payload, exchange, routing_key, opts = {})
  Bunny::Testing.exchanges[exchange] << {payload: payload, routing_key: routing_key, opts: opts}
end

#openObject



72
73
74
75
76
# File 'lib/bunny/testing.rb', line 72

def open
  @status = :open

  self
end

#register_exchange(exchange) ⇒ Object



78
79
80
# File 'lib/bunny/testing.rb', line 78

def register_exchange(exchange)
  Bunny::Testing.exchanges[exchange.name] = []
end