Module: BunnyPublisher::Test
- Defined in:
- lib/bunny_publisher/test.rb
Overview
Test module prevents real connections to be made and replaces exchange with array-based TestExchange
Defined Under Namespace
Classes: TestExchange
Instance Method Summary collapse
- #exchange ⇒ Object (also: #messages)
- #flush! ⇒ Object (also: #close, #stop)
Instance Method Details
#exchange ⇒ Object Also known as: messages
16 17 18 |
# File 'lib/bunny_publisher/test.rb', line 16 def exchange @exchange ||= TestExchange.new end |
#flush! ⇒ Object Also known as: close, stop
22 23 24 |
# File 'lib/bunny_publisher/test.rb', line 22 def flush! exchange.clear end |