README.md in phobos-2.0.0.pre.beta1 vs README.md in phobos-2.0.1
- old
+ new
@@ -594,11 +594,19 @@
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 and metadata are optional).
```ruby
-require 'spec_helper'
+### spec_helper.rb
+require 'phobos/test/helper'
+RSpec.configure do |config|
+ config.include Phobos::Test::Helper
+ config.before(:each) do
+ Phobos.configure(path_to_my_config_file)
+ end
+end
+### Spec file
describe MyConsumer do
let(:payload) { 'foo' }
let(:metadata) { Hash(foo: 'bar') }
it 'consumes my message' do