Module: Moqueue::Matchers
- Defined in:
- lib/moqueue/matchers.rb
Defined Under Namespace
Classes: HasAcked, HasExactRoutingKey, HasReceived
Instance Method Summary collapse
- #have_received_ack_for(expected_msg) ⇒ Object (also: #have_ack_for)
-
#have_received_exact_routing_key(expected_key) ⇒ Object
(also: #have_exact_routing_key)
Customer matcher for verifying a message was received with a specific routing key (matches exactly, no wildcards).
- #have_received_message(expected_msg) ⇒ Object (also: #have_received)
Instance Method Details
#have_received_ack_for(expected_msg) ⇒ Object Also known as: have_ack_for
88 89 90 |
# File 'lib/moqueue/matchers.rb', line 88 def have_received_ack_for(expected_msg) HasAcked.new(expected_msg) end |
#have_received_exact_routing_key(expected_key) ⇒ Object Also known as: have_exact_routing_key
Customer matcher for verifying a message was received with a specific routing key (matches exactly, no wildcards)
queue.bind(exchange).subscribe {|msg| msg}
exchange.publish msg, :key => 'foo.bar.baz'
queue.should have_received_routing_key('foo.bar.baz')
99 100 101 |
# File 'lib/moqueue/matchers.rb', line 99 def have_received_exact_routing_key(expected_key) HasExactRoutingKey.new(expected_key) end |
#have_received_message(expected_msg) ⇒ Object Also known as: have_received
84 85 86 |
# File 'lib/moqueue/matchers.rb', line 84 def (expected_msg) HasReceived.new(expected_msg) end |