2.0-Upgrade.md in karafka-testing-2.0.4 vs 2.0-Upgrade.md in karafka-testing-2.0.5

- old
+ new

@@ -5,11 +5,11 @@ ## Upgrade Please upgrade your application to `Karafka 2.0` first. - Replace `#karafka_consumer_for` in your specs with `#karafka.consumer_for` -- Replace `#publish_for_karafka` in your specs with `#karafka.publish` +- Replace `#publish_for_karafka` in your specs with `#karafka.produce` And that's all! Below you can find same example written for Karafka `2.0` and `1.4`. @@ -22,11 +22,11 @@ let(:nr1_value) { rand } let(:nr2_value) { rand } let(:sum) { nr1_value + nr2_value } before do - karafka.publish({ 'number' => nr1_value }.to_json) - karafka.publish({ 'number' => nr2_value }.to_json, partition: 2) + karafka.produce({ 'number' => nr1_value }.to_json) + karafka.produce({ 'number' => nr2_value }.to_json, partition: 2) allow(Karafka.logger).to receive(:info) end it 'expects to log a proper message' do expect(Karafka.logger).to receive(:info).with("Sum of 2 elements equals to: #{sum}")