lib/deimos/test_helpers.rb in deimos-ruby-1.5.0.pre.beta2 vs lib/deimos/test_helpers.rb in deimos-ruby-1.6.0.pre.beta1

- old
+ new

@@ -199,10 +199,11 @@ message = double('message', 'key' => key, 'partition_key' => partition_key, 'partition' => 1, 'offset' => 1, + 'headers' => {}, 'value' => payload) unless skip_expectation expectation = expect(handler).to receive(:consume). with(payload, anything, &block) @@ -220,11 +221,11 @@ # @param payload [Hash] def test_consume_invalid_message(handler_class, payload) expect { handler_class.decoder.validate(payload, schema: handler_class.decoder.schema) - }.to raise_error + }.to raise_error(Avro::SchemaValidator::ValidationError) end # Test that a given handler will consume a given batch payload correctly, # i.e. that the schema is correct. If # a block is given, that block will be executed when `consume` is called. @@ -260,9 +261,10 @@ double('message', 'key' => key, 'partition_key' => partition_key, 'partition' => 1, 'offset' => 1, + 'headers' => {}, 'value' => payload) end batch = double('fetched_batch', 'messages' => batch_messages, 'topic' => topic_name,