From afd243c5485dd5f757ff4bb5594d94e0c84629ad Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Wed, 5 Dec 2018 15:39:57 +0000 Subject: [PATCH] Replace stub with allow in checkout_controller_spec --- spec/controllers/checkout_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/checkout_controller_spec.rb b/spec/controllers/checkout_controller_spec.rb index ddd5636d8a..8f3397ac5f 100644 --- a/spec/controllers/checkout_controller_spec.rb +++ b/spec/controllers/checkout_controller_spec.rb @@ -93,10 +93,10 @@ describe CheckoutController, type: :controller do allow(ResetOrderService).to receive(:new).with(controller, order) { reset_order_service } allow(reset_order_service).to receive(:call) allow(order).to receive(:update_attributes).and_return true - controller.stub(:current_order).and_return(order) + allow(controller).to receive(:current_order).and_return order # make order workflow pass through delivery - order.stub(:next).twice do + allow(order).to receive(:next).twice do if order.state == 'cart' order.update_column :state, 'delivery' else