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

- old
+ new

@@ -21,10 +21,12 @@ # @param topic [String, Hash{Symbol => Mixed}] the actual message # topic (full as string, or parts via hash) # @return [OpenStruct] the fake deserialized Kafka message # # rubocop:disable Metrics/MethodLength because of the various properties + # rubocop:disable Style/OpenStructUse because existing specs may rely + # on this data type def kafka_message(topic: nil, headers: {}, **payload) OpenStruct.new( topic: Rimless.topic(topic), headers: headers, payload: payload, @@ -36,9 +38,10 @@ receive_time: Time.current, deserialized: true ) end # rubocop:enable Metrics/MethodLength + # rubocop:enable Style/OpenStructUse # 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