From 0ed4b2ac908a922adf9765ffeb9d6d6b48e4c6f3 Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Tue, 10 Jan 2023 17:14:55 +0100 Subject: [PATCH] add spec to verify that generating test locales works --- spec/integration/generated_locale_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/integration/generated_locale_spec.rb diff --git a/spec/integration/generated_locale_spec.rb b/spec/integration/generated_locale_spec.rb new file mode 100644 index 00000000..00e65d41 --- /dev/null +++ b/spec/integration/generated_locale_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require "rails_helper" + +describe "test locale generation" do + before(:context) { Rails.application.load_tasks } + + it "succeeds" do + allow($stdout).to receive(:puts) + + Rake::Task["locale:generate"].invoke + + %w[activerecord controllers errors frontend views voc].each do |locale_type| + expect($stdout).to have_received(:puts).with a_string_including("generating #{locale_type}.en-xx.yml") + end + end +end