Parent

Files

Moqueue::Matchers::HasExactRoutingKey

Public Class Methods

new(expected_key) click to toggle source
    # File lib/moqueue/matchers.rb, line 59
59:       def initialize(expected_key)
60:         @expected_key = expected_key
61:       end

Public Instance Methods

failure_message_for_should() click to toggle source
    # File lib/moqueue/matchers.rb, line 74
74:       def failure_message_for_should
75:         "expected #{@queue.inspect} to have received header with routing key ``#{@expected_msg}''"
76:       end
failure_message_for_should_not() click to toggle source
    # File lib/moqueue/matchers.rb, line 78
78:       def failure_message_for_should_not
79:         "expected #{@queue.inspect} to not have received header with routing key ``#{@expected_msg}''"
80:       end
matches?(queue) click to toggle source
    # File lib/moqueue/matchers.rb, line 63
63:       def matches?(queue)
64:         if queue.respond_to?(:received_routing_key?)
65:           @queue = queue
66:           @queue.received_routing_key?(@expected_key)
67:         else
68:           raise NoMethodError, 
69:           "Grrr. you can't use ``should have_received_routing_key'' on #{queue.inspect} " +
70:           "because it doesn't respond_to :received_routing_key?"
71:         end
72:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.