diff --git a/spec/helpers/calculators/calculation_service_helper_spec.rb b/spec/helpers/calculators/calculation_service_helper_spec.rb index 966d1f1c6..1e81b43a8 100644 --- a/spec/helpers/calculators/calculation_service_helper_spec.rb +++ b/spec/helpers/calculators/calculation_service_helper_spec.rb @@ -14,11 +14,14 @@ before do allow_any_instance_of(ApplicationHelper).to receive(:current_locale?).with(:en).and_return(locale_en) - I18n.locale = locale_en ? :en : :uk end describe "#perform" do - subject { described_class.new(calculator, inputs).perform } + subject do + I18n.with_locale(locale_en ? :en : :uk) do + described_class.new(calculator, inputs).perform + end + end context "when locale is English" do let(:locale_en) { true }