From c98d58378c13e45fc77b8cbe3dafb11944e62896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sat, 23 Mar 2013 15:49:31 +0100 Subject: [PATCH] prevent double work in the i18n integrity specs --- spec/integrity/i18n_spec.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spec/integrity/i18n_spec.rb b/spec/integrity/i18n_spec.rb index d40a6effb..a39e3f332 100644 --- a/spec/integrity/i18n_spec.rb +++ b/spec/integrity/i18n_spec.rb @@ -21,17 +21,21 @@ describe "i18n integrity checks" do end end - it "has valid YAML for client and server" do - Dir["#{Rails.root}/config/locales/*.yml"].each do |f| + it "has valid YAML for client" do + Dir["#{Rails.root}/config/locales/client.*.yml"].each do |f| locale = /.*\.([^.]{2,})\.yml$/.match(f)[1] - client = YAML.load_file("#{Rails.root}/config/locales/client.#{locale}.yml") client.count.should == 1 client[locale].should_not == nil client[locale].count.should == 2 client[locale]["js"].should_not == nil client[locale]["admin_js"].should_not == nil + end + end + it "has valid YAML for server" do + Dir["#{Rails.root}/config/locales/server.*.yml"].each do |f| + locale = /.*\.([^.]{2,})\.yml$/.match(f)[1] server = YAML.load_file("#{Rails.root}/config/locales/server.#{locale}.yml") server.count.should == 1 server[locale].should_not == nil