Skip to content

Commit 14ac355

Browse files
committed
Reset mocks
1 parent d455d1b commit 14ac355

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/cmab_client_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
require 'optimizely/cmab/cmab_client'
2121

2222
describe Optimizely::DefaultCmabClient do
23-
let(:mock_http_client) { double('http_client') }
24-
let(:spy_logger) { spy('logger') }
23+
let!(:mock_http_client) { double('http_client') }
24+
let!(:spy_logger) { spy('logger') }
2525
let(:retry_config) { Optimizely::CmabRetryConfig.new(max_retries: 3, retry_delay: 0.01, max_backoff: 1, backoff_multiplier: 2) }
2626
let(:client) { described_class.new(mock_http_client, nil, spy_logger) }
2727
let(:client_with_retry) { described_class.new(mock_http_client, retry_config, spy_logger) }
@@ -47,6 +47,8 @@
4747

4848
before do
4949
allow(Kernel).to receive(:sleep)
50+
RSpec::Mocks.space.proxy_for(mock_http_client).reset
51+
RSpec::Mocks.space.proxy_for(spy_logger).reset
5052
end
5153

5254
it 'should return the variation id on success without retrying' do

0 commit comments

Comments
 (0)