README.md in phobos-1.6.0 vs README.md in phobos-1.6.1
- old
+ new
@@ -453,17 +453,17 @@
## <a name="test"></a> Test
Phobos exports a spec helper that can help you test your consumer. The Phobos lifecycle will conveniently be activated for you with minimal setup required.
-* `process_message(handler:, payload:, metadata:, encoding: nil)` - Invokes your handler with payload and metadata, using a dummy listener (encoding is optional).
+* `process_message(handler:, payload:, metadata: {}, encoding: nil)` - Invokes your handler with payload and metadata, using a dummy listener (encoding and metadata are optional).
```ruby
require 'spec_helper'
describe MyConsumer do
let(:payload) { 'foo' }
- let(:metadata) { 'foo' }
+ let(:metadata) { Hash(foo: 'bar') }
it 'consumes my message' do
expect(described_class).to receive(:around_consume).with(payload, metadata).once.and_call_original
expect_any_instance_of(described_class).to receive(:before_consume).with(payload).once.and_call_original
expect_any_instance_of(described_class).to receive(:consume).with(payload, metadata).once.and_call_original