From 78ee53f728df5fa48e17fcc5092cd3f4b09a14ca Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 27 Mar 2026 13:06:16 +1100 Subject: [PATCH] Fix config leak in specs --- spec/system/admin/variants_spec.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/system/admin/variants_spec.rb b/spec/system/admin/variants_spec.rb index 2f6280f778..c4653b48ff 100644 --- a/spec/system/admin/variants_spec.rb +++ b/spec/system/admin/variants_spec.rb @@ -220,13 +220,9 @@ RSpec.describe ' let(:product) { create(:simple_product) } let(:variant) { product.variants.first } - around do |example| - I18n.default_locale = :es - example.run - I18n.default_locale = :en - end - before do + allow(I18n).to receive(:default_locale).and_return(:es) + variant.update( unit_value: 1, unit_description: 'foo' ) # When I view the variant