diff --git a/spec/interactors/pay_cart_spec.rb b/spec/interactors/pay_cart_spec.rb index 440a162..5d19740 100644 --- a/spec/interactors/pay_cart_spec.rb +++ b/spec/interactors/pay_cart_spec.rb @@ -162,7 +162,8 @@ context 'when things come in fast', :transactional do it 'shouldn\'t do things twice' do - # Always returning the same cart object shares it between threads + # Don't return the object in the cart variable, as this would share + # the same instance of the object between all threads allow(Cart).to receive(:find_by!).with(id: cart.id).and_call_original expect do threaded(3) do