From 7f30fbe221d7fd08d8d50054926619d4a9145a34 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 16 Nov 2023 14:26:24 +0100 Subject: [PATCH] RSpec: Ensure that locales are present for i18n-js --- spec/support/i18n_export.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 spec/support/i18n_export.rb diff --git a/spec/support/i18n_export.rb b/spec/support/i18n_export.rb new file mode 100644 index 00000000..aff03960 --- /dev/null +++ b/spec/support/i18n_export.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +RSpec.configure do |config| + config.before(:suite) do + # In local development, we do not want to precompile assets explicitly. + # Therefore, we might need to export the translations before running the tests. + system('bundle exec i18n export') if ENV['CI'].blank? + end +end