diff --git a/app/interactors/sbmt/outbox/process_item.rb b/app/interactors/sbmt/outbox/process_item.rb index 9418c2f..59d1f70 100644 --- a/app/interactors/sbmt/outbox/process_item.rb +++ b/app/interactors/sbmt/outbox/process_item.rb @@ -93,7 +93,7 @@ def check_retry_strategy(item, retry_strategy) track_discarded(item) Failure(:discard_item) else - track_failed("retry stratagy returned unknown failure: #{result.failure}") + track_failed("retry strategy returned unknown failure: #{result.failure}") Failure(:retry_strategy_failure) end end diff --git a/spec/interactors/sbmt/outbox/process_item_spec.rb b/spec/interactors/sbmt/outbox/process_item_spec.rb index 2c94494..16fbafc 100644 --- a/spec/interactors/sbmt/outbox/process_item_spec.rb +++ b/spec/interactors/sbmt/outbox/process_item_spec.rb @@ -170,7 +170,7 @@ context "when retry process" do let!(:outbox_item) { create(:outbox_item, processed_at: Time.current) } - it "do not track process_latency" do + it "doesn't track process_latency" do expect { result }.not_to measure_yabeda_histogram(Yabeda.outbox.process_latency) end end @@ -288,7 +288,7 @@ expect(dummy_middleware).to have_received(:call).with(outbox_item) end - it "increment errors count" do + it "increments errors count" do expect { result }.to change { outbox_item.reload.errors_count }.from(0).to(1) end @@ -316,7 +316,7 @@ create(:outbox_item, processed_at: 1.hour.ago) end - it "increment errors count" do + it "increments errors count" do expect { result }.to change { outbox_item.reload.errors_count }.from(0).to(1) end diff --git a/spec/jobs/sbmt/outbox/base_delete_stale_items_job_spec.rb b/spec/jobs/sbmt/outbox/base_delete_stale_items_job_spec.rb index 7ab63e7..e9b4b86 100644 --- a/spec/jobs/sbmt/outbox/base_delete_stale_items_job_spec.rb +++ b/spec/jobs/sbmt/outbox/base_delete_stale_items_job_spec.rb @@ -25,7 +25,7 @@ def item_classes .to change(OutboxItem, :count).by(-1) end - context "when item is too yang" do + context "when item is too young" do let(:created_at) { 1.hour.ago } it "doesn't delete item" do diff --git a/spec/lib/sbmt/outbox/v2/poll_throttler/composite_spec.rb b/spec/lib/sbmt/outbox/v2/poll_throttler/composite_spec.rb index 8dc42b4..d5d5691 100644 --- a/spec/lib/sbmt/outbox/v2/poll_throttler/composite_spec.rb +++ b/spec/lib/sbmt/outbox/v2/poll_throttler/composite_spec.rb @@ -45,19 +45,19 @@ allow(throttle_throttler).to receive(:call).and_return(Dry::Monads::Result::Success.new(Sbmt::Outbox::V2::Throttler::THROTTLE_STATUS)) end - it "return skip if present" do + it "returns skip if present" do expect(described_class.new(throttlers: [ throttle_throttler, noop_throttler, skip_throttler, failure_throttler ]).call(0, task, nil).value!).to eq(Sbmt::Outbox::V2::Throttler::SKIP_STATUS) end - it "return failure if present" do + it "returns failure if present" do expect(described_class.new(throttlers: [ throttle_throttler, noop_throttler, failure_throttler ]).call(0, task, nil).failure).to eq("some err") end - it "return throttle if present" do + it "returns throttle if present" do expect(described_class.new(throttlers: [ throttle_throttler, noop_throttler ]).call(0, task, nil).value!).to eq(Sbmt::Outbox::V2::Throttler::THROTTLE_STATUS)