From f29707fea360069c0b3c5d28a1166e0b84b13d68 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Thu, 14 Feb 2019 18:20:14 +0100 Subject: [PATCH] Perform delivery when checking deliveries in specs Otherwise checking `ActionMailer::Base.deliveries.count` won't see any. --- spec/controllers/user_confirmations_controller_spec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/controllers/user_confirmations_controller_spec.rb b/spec/controllers/user_confirmations_controller_spec.rb index 854a5c1d9e..366884d30d 100644 --- a/spec/controllers/user_confirmations_controller_spec.rb +++ b/spec/controllers/user_confirmations_controller_spec.rb @@ -68,9 +68,11 @@ describe UserConfirmationsController, type: :controller do end it "sends the confirmation email" do - expect do - spree_post :create, { spree_user: { email: unconfirmed_user.email } } - end.to send_confirmation_instructions + performing_deliveries do + expect do + spree_post :create, { spree_user: { email: unconfirmed_user.email } } + end.to send_confirmation_instructions + end end end end