Merge pull request #7255 from mkllnk/fail-on-translations

Raise errors in specs with missing translations
This commit is contained in:
Andy Brett
2021-03-30 08:37:15 -07:00
committed by GitHub
7 changed files with 129 additions and 14 deletions

View File

@@ -21,6 +21,10 @@ describe "i18n" do
}
}
)
allow(ActionView::Base).
to receive(:raise_on_missing_translations).
and_return(false)
end
it "translates within the spree scope" do

View File

@@ -1,7 +0,0 @@
# frozen_string_literal: true
# From: https://robots.thoughtbot.com/better-tests-through-internationalization
I18n.exception_handler = lambda do |_exception, _locale, key, _options|
raise "missing translation: #{key}"
end