Remove unnecessary spec clean-up

And clarify locale setup.
This commit is contained in:
Maikel Linke
2023-06-29 10:35:01 +10:00
committed by Jean-Baptiste Bellet
parent 2fcf706aa3
commit 8b3f45263c

View File

@@ -182,10 +182,13 @@ describe '
let(:product) { create(:simple_product, variant_unit: "weight", variant_unit_scale: "1") }
let(:variant) { product.variants.first }
before do
# sets the locale into ES
I18n.default_locale = 'es'
around do |example|
I18n.default_locale = :es
example.run
I18n.default_locale = :en
end
before do
variant.update( unit_value: 1, unit_description: 'foo' )
# When I view the variant
@@ -220,14 +223,6 @@ describe '
expect(Spree::Price.second.amount).to eq(12.50)
end
end
after do
# sets the locale back to EN
I18n.default_locale = 'en'
# disables localization to prevent leaking between specs
allow(Spree::Config).to receive(:enable_localized_number?).and_return false
end
end
it_behaves_like "with localization", false, ".", ","