diff --git a/spec/features/remote_translations_spec.rb b/spec/features/remote_translations_spec.rb index 92a16d1c3..dd6d3a78a 100644 --- a/spec/features/remote_translations_spec.rb +++ b/spec/features/remote_translations_spec.rb @@ -10,12 +10,6 @@ describe "Remote Translations" do and_return(available_locales_response) end - after do - allow(I18n).to receive(:available_locales).and_call_original - allow(I18n.fallbacks).to receive(:[]).and_call_original - Globalize.set_fallbacks_to_all_available_locales - end - describe "Display remote translation button when locale is included in microsoft translate client" do context "with locale that has :en fallback" do diff --git a/spec/models/budget_spec.rb b/spec/models/budget_spec.rb index 1ea1d534a..f2744c8fe 100644 --- a/spec/models/budget_spec.rb +++ b/spec/models/budget_spec.rb @@ -274,10 +274,6 @@ describe Budget do end describe "#formatted_amount" do - after do - I18n.locale = :en - end - it "correctly formats Euros with Spanish" do budget.update(currency_symbol: "€") I18n.locale = :es diff --git a/spec/models/concerns/globalizable.rb b/spec/models/concerns/globalizable.rb index b63734117..7dc88543b 100644 --- a/spec/models/concerns/globalizable.rb +++ b/spec/models/concerns/globalizable.rb @@ -21,12 +21,6 @@ shared_examples_for "globalizable" do |factory_name| end end - after do - allow(I18n).to receive(:available_locales).and_call_original - allow(I18n.fallbacks).to receive(:[]).and_call_original - Globalize.set_fallbacks_to_all_available_locales - end - context "With a defined fallback" do before do allow(I18n.fallbacks).to receive(:[]).and_return([:fr, :es]) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a85ff40d4..698e52c0b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -45,9 +45,7 @@ RSpec.configure do |config| DatabaseCleaner.strategy = :transaction I18n.locale = :en Globalize.locale = I18n.locale - unless %i[controller feature request].include? example.metadata[:type] - Globalize.set_fallbacks_to_all_available_locales - end + Globalize.set_fallbacks_to_all_available_locales load Rails.root.join("db", "seeds.rb").to_s Setting["feature.user.skip_verification"] = nil end