Class: Karafka::Testing::Minitest::Proxy
- Inherits:
-
Object
- Object
- Karafka::Testing::Minitest::Proxy
- Defined in:
- lib/karafka/testing/minitest/proxy.rb
Overview
Proxy object for a nicer karafka.
API within Minitest None other should be used by the end users
Instance Method Summary collapse
- #consumer_for(*args) ⇒ Object
-
#consumer_messages ⇒ Array<Karafka::Messages::Message>
Array of messages that will be used to construct the final consumer messages batch.
-
#initialize(minitest_example) ⇒ Proxy
constructor
A new instance of Proxy.
- #produce(*args) ⇒ Object
-
#produced_messages ⇒ Array<Hash>
Messages produced via
Karafka#producer
.
Constructor Details
#initialize(minitest_example) ⇒ Proxy
Returns a new instance of Proxy.
10 11 12 |
# File 'lib/karafka/testing/minitest/proxy.rb', line 10 def initialize(minitest_example) @minitest_example = minitest_example end |
Instance Method Details
#consumer_for(*args) ⇒ Object
15 16 17 |
# File 'lib/karafka/testing/minitest/proxy.rb', line 15 def consumer_for(*args) @minitest_example._karafka_consumer_for(*args) end |
#consumer_messages ⇒ Array<Karafka::Messages::Message>
Returns array of messages that will be used to construct the final consumer messages batch.
31 32 33 |
# File 'lib/karafka/testing/minitest/proxy.rb', line 31 def @minitest_example. end |
#produce(*args) ⇒ Object
20 21 22 |
# File 'lib/karafka/testing/minitest/proxy.rb', line 20 def produce(*args) @minitest_example._karafka_produce(*args) end |
#produced_messages ⇒ Array<Hash>
Returns messages produced via Karafka#producer
.
25 26 27 |
# File 'lib/karafka/testing/minitest/proxy.rb', line 25 def @minitest_example. end |