From 460830a98248d9dc6dbbdc80079f34d670f46e9a Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 1 Jun 2021 19:47:09 +0200 Subject: [PATCH] Update spec/lib/open_food_network/i18n_config_spec.rb --- spec/lib/open_food_network/i18n_config_spec.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec/lib/open_food_network/i18n_config_spec.rb b/spec/lib/open_food_network/i18n_config_spec.rb index 611f677a6317..b69aa8b745fc 100644 --- a/spec/lib/open_food_network/i18n_config_spec.rb +++ b/spec/lib/open_food_network/i18n_config_spec.rb @@ -6,11 +6,8 @@ module OpenFoodNetwork describe I18nConfig do before do - # These are only needed here because we are stubbing ENV elsewhere in this file - # Here we make these calls to ENV return a value and that makes database_cleaner work - allow(ENV).to receive(:[]).with("DATABASE_CLEANER_ALLOW_PRODUCTION").and_return("false") - allow(ENV).to receive(:[]).with("DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL"). - and_return("false") + # Allow non-stubbed calls to ENV to proceed + allow(ENV).to receive(:[]).and_call_original end context "in default test configuration" do