spec/consumer_spec.rb in deimos-ruby-1.8.1.pre.beta5 vs spec/consumer_spec.rb in deimos-ruby-1.8.1.pre.beta6
- old
+ new
@@ -30,9 +30,15 @@
'some_int' => 123) do |payload, _metadata|
expect(payload['test_id']).to eq('foo')
end
end
+ it 'should consume a nil message' do
+ test_consume_message(MyConsumer, nil) do |payload, _metadata|
+ expect(payload).to be_nil
+ end
+ end
+
it 'should consume a message idempotently' do
# testing for a crash and re-consuming the same message/metadata
key = { 'test_id' => 'foo' }
test_metadata = { key: key }
allow_any_instance_of(MyConsumer).to(receive(:decode_key)) do |_instance, k|