From fc845a36f1b882fffab04eb712f4c7c2ed6625ee Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Sat, 10 Dec 2016 18:01:33 +1100 Subject: [PATCH] Fix weird spec failure cause by a Rails.cache.clear call resetting the currency to USD on CI only --- spec/jobs/standing_order_placement_job_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/jobs/standing_order_placement_job_spec.rb b/spec/jobs/standing_order_placement_job_spec.rb index 6bba533a3e..7ce041af70 100644 --- a/spec/jobs/standing_order_placement_job_spec.rb +++ b/spec/jobs/standing_order_placement_job_spec.rb @@ -78,6 +78,8 @@ describe StandingOrderPlacementJob do end it "moves orders to completion, but does not process the payment" do + # If this spec starts complaining about no shipping methods being available + # on CI, there is probably another spec resetting the currency though Rails.cache.clear order = standing_order1.orders.first ActionMailer::Base.deliveries.clear expect{job.send(:process, order)}.to change{order.reload.completed_at}.from(nil)