def basic_publish(payload, xchg, routing_key, opts = {})
      xchg = xchg_find_or_create(xchg) unless xchg.respond_to? :name

      xchg.publish payload, opts.merge(routing_key: routing_key)

      self
    end
def basic_publish(payload, xchg, routing_key, opts = {})
      xchg = xchg_find_or_create(xchg) unless xchg.respond_to? :name

      xchg.publish payload, opts.merge(routing_key: routing_key)

      self
    end
Mocks Bunny::Channel#basic_publish

 @param [String] payload Message payload. It will never be modified by Bunny or RabbitMQ in any way.
 @param [String] exchange Exchange to publish to
 @param [String] routing_key Routing key
 @param [Hash] opts Publishing options
 @return [BunnyMock::Channel] Self