spec/kpm/unit/actions_spec.rb in kpm-0.8.2 vs spec/kpm/unit/actions_spec.rb in kpm-0.9.0

- old
+ new

@@ -6,11 +6,11 @@ subject { described_class.new({}, nil, logger) } let(:logger) { Logger.new(STDOUT) } let(:nexus_mock) { double(KPM::NexusFacade::NexusApiCallsV2) } before do - KPM::NexusFacade::NexusApiCallsV2.stub(:new).and_return(nexus_mock) + allow(KPM::NexusFacade::NexusApiCallsV2).to receive(:new).and_return(nexus_mock) end context 'when Nexus throws a non-retryable exception' do it 'never retries' do calls = 0 @@ -43,10 +43,10 @@ expect(subject.send(:retry_exceptions, 'foo') do calls += 1 raise OpenSSL::SSL::SSLErrorWaitReadable if calls < 2 true - end).to be_true + end).to be_truthy expect(calls).to eq(2) end end end