From 6a06e0ac3b5c5820173e223f5c168bff79204cb2 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 20 Sep 2018 09:46:10 +1000 Subject: [PATCH] Raise error on missing translation keys --- spec/support/i18n_error_raising.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 spec/support/i18n_error_raising.rb diff --git a/spec/support/i18n_error_raising.rb b/spec/support/i18n_error_raising.rb new file mode 100644 index 0000000000..9cef014820 --- /dev/null +++ b/spec/support/i18n_error_raising.rb @@ -0,0 +1,5 @@ +# From: https://robots.thoughtbot.com/better-tests-through-internationalization + +I18n.exception_handler = lambda do |exception, locale, key, options| + raise "missing translation: #{key}" +end