Skip to content

Commit

Permalink
Review fixes - reorgonize spec
Browse files Browse the repository at this point in the history
  • Loading branch information
zzaakiirr committed Aug 23, 2024
1 parent ccf58b9 commit 046349f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/command/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

describe "#step" do
let(:message) { "test message" }
let(:common_options) { { abort_on_error: false } }

context "with retry_on_failure: true" do
let(:options) { { retry_on_failure: true, wait: 0 } }
let(:options) { common_options.merge(retry_on_failure: true, wait: 0) }

it "retries block until success" do
run_count = 0
Expand All @@ -28,7 +29,7 @@
end

context "with max_retry_count option" do
let(:options) { super().merge(max_retry_count: 1) }
let(:options) { common_options.merge(retry_on_failure: true, wait: 0, max_retry_count: 1) }

it "retries block specified times" do
run_count = 0
Expand All @@ -44,7 +45,7 @@
end

context "with retry_on_failure: false" do
let(:options) { { retry_on_failure: false } }
let(:options) { common_options.merge(retry_on_failure: false) }

it "does not retry block" do
run_count = 0
Expand Down

0 comments on commit 046349f

Please sign in to comment.