From 77f12fac941db5d87b94d7875557f2c392d41101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Sat, 17 Jun 2017 00:24:55 +0200 Subject: [PATCH] Better comment --- spec/interactors/pay_cart_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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