Class: RosettaQueue::Matchers::PublishMessageMatcher
- Inherits:
-
Object
- Object
- RosettaQueue::Matchers::PublishMessageMatcher
show all
- Defined in:
- lib/rosetta_queue/spec_helpers/publishing_matchers.rb
Instance Method Summary
collapse
Instance Method Details
#matches?(lambda_to_run) ⇒ Boolean
55
56
57
58
59
60
61
62
63
|
# File 'lib/rosetta_queue/spec_helpers/publishing_matchers.rb', line 55
def matches?(lambda_to_run)
RosettaQueue::Adapter.stub!(:instance).and_return(fake_adapter = RosettaQueue::Gateway::FakeAdapter.new)
lambda_to_run.call
message = fake_adapter.messages_sent_to(@expected_queue).first || ''
@actual_message = message
end
|