From df8ea4045c98539a2400bc1f93e76d1f7269c3f9 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 12 May 2020 18:20:29 +0200 Subject: [PATCH] Fix spec --- spec/lib/docker_client_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/lib/docker_client_spec.rb b/spec/lib/docker_client_spec.rb index 8bb7a975..4cc8ce26 100644 --- a/spec/lib/docker_client_spec.rb +++ b/spec/lib/docker_client_spec.rb @@ -369,7 +369,10 @@ describe DockerClient, docker: true do end context 'when a timeout occurs' do - before(:each) { expect(container).to receive(:exec).and_raise(Timeout::Error) } + before(:each) do + expect(container).to receive(:exec).once.and_raise(Timeout::Error) + expect(container).to receive(:exec).twice.and_return([ [], [] ]) + end it 'destroys the container asynchronously' do pending("Container is destroyed, but not as expected in this test. ToDo update this test.")