From f8f85e7fbdc5dd3c4105bbd0a0426b6b7f1dbd14 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Tue, 5 Dec 2023 18:09:59 +0000 Subject: [PATCH] Adds I18n exception handler as test initializer As per code review, we follow this approach https://sikac.hu/missing-translations-keys-gotta-catch-em-all-3aa8d2ead8bd --- config/initializers/test.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 config/initializers/test.rb diff --git a/config/initializers/test.rb b/config/initializers/test.rb new file mode 100644 index 0000000000..af1f0f4479 --- /dev/null +++ b/config/initializers/test.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +I18n.exception_handler = Proc.new do |exception, *_| + raise exception.to_exception +end \ No newline at end of file