test_lib/provider/rabbitmq.rb in message-driver-0.6.1 vs test_lib/provider/rabbitmq.rb in message-driver-0.7.0

- old
+ new

@@ -19,11 +19,11 @@ msgs = rabbitmq.get_messages(vhost, destination.name, { count: 10, requeue: false, encoding: 'auto' }.merge(opts)) msgs.each do |msg| if msg.nil? break else - result << build_message(msg) + result << build_message(msg, destination) end end break if msgs.nil? || msgs.empty? end result @@ -44,13 +44,13 @@ end end private - def build_message(data) + def build_message(data, destination) props = data.properties.dup headers = props.delete(:headers) - MessageDriver::Message::Base.new(Context, data.payload, headers, props) + MessageDriver::Message::Base.new(Context, destination, data.payload, headers, props) end def vhost @vhost ||= BrokerConfig.config[:vhost] end