Skip to content

Commit

Permalink
Better comment
Browse files Browse the repository at this point in the history
  • Loading branch information
thegcat committed Jun 16, 2017
1 parent 8f0aeba commit 77f12fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/interactors/pay_cart_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77f12fa

Please sign in to comment.