# Pastebin hJaaKQRT it "can be passed an array" do purchases = 2.times.map do p = double(state: 'pending') expect(p).to receive(:update_attribute).with(:state, 'abandoned') p end AbandonsPurchases.abandon(purchases) end