lib/rimless/rspec/helpers.rb in rimless-1.1.1 vs lib/rimless/rspec/helpers.rb in rimless-1.2.0

- old
+ new

@@ -36,8 +36,16 @@ receive_time: Time.current, deserialized: true ) end # rubocop:enable Metrics/MethodLength + + # Capture all Apache Kafka messages of the given block. + # + # @yield the given block to capture the messages + # @return [Array<Hash{Symbol => Mixed}>] the captured messages + def capture_kafka_messages(&block) + Rimless::RSpec::Matchers::HaveSentKafkaMessage.new(nil).capture(&block) + end end end end