aboutsummaryrefslogtreecommitdiffstats
path: root/spec/services/retry_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/retry_service_spec.rb')
-rw-r--r--spec/services/retry_service_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/services/retry_service_spec.rb b/spec/services/retry_service_spec.rb
index ce150f808..bb3416373 100644
--- a/spec/services/retry_service_spec.rb
+++ b/spec/services/retry_service_spec.rb
@@ -42,7 +42,7 @@ RSpec.describe RetryService do
expect( subject ).to receive(:sleep).with(2)
end
- it 'succeds the second time' do
+ it 'succeeds the second time' do
expect( subject.execute{ succeed_later(ArgumentError){ 42 } } ).to eq(Result.ok(42))
end
@@ -58,7 +58,8 @@ RSpec.describe RetryService do
expect( subject ).to receive(:sleep).with(3)
end
it 'succeeds the third time with try again (automatically registered exception)' do
- expect( subject.execute{ succeed_later(RetryService::Retry, count: 2){ 42 } } ).to eq(Result.ok(42))
+ result = subject.execute{ succeed_later(RetryService::Retry, count: 2){ 42 } }
+ expect( result ).to eq( Result.ok(42) )
end
end