From 0b48c76cce691aafa5518783f5d5a1f9248fb533 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 10 Feb 2017 16:00:58 +0100 Subject: [PATCH] Improved support for different version of translation cache files. Fixed test. --- spec/models/translation_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/models/translation_spec.rb b/spec/models/translation_spec.rb index 2116ed34c..88b55a456 100644 --- a/spec/models/translation_spec.rb +++ b/spec/models/translation_spec.rb @@ -97,8 +97,9 @@ RSpec.describe Translation do context 'file based import' do it 'check download of locales' do + version = Version.get directory = Rails.root.join('config') - file = Rails.root.join("#{directory}/locales.yml") + file = Rails.root.join("#{directory}/locales-#{version}.yml") if File.exist?(file) File.delete(file) end @@ -113,7 +114,7 @@ RSpec.describe Translation do if File.directory?(directory) FileUtils.rm_rf(directory) end - file = Rails.root.join("#{directory}/#{locale}.yml") + file = Rails.root.join("#{directory}/#{locale}-#{version}.yml") expect(File.exist?(file)).to be false Translation.fetch(locale) expect(File.exist?(file)).to be true