FIX: i18n integrity check was not ignoring comments properly

This commit is contained in:
Robin Ward 2014-02-14 14:47:52 -05:00
parent b95db5fcae
commit 16c6759818

View file

@ -46,9 +46,10 @@ describe "i18n integrity checks" do
Dir["#{Rails.root}/config/locales/*.yml"].each do |f| Dir["#{Rails.root}/config/locales/*.yml"].each do |f|
locale = /.*\.([^.]{2,})\.yml$/.match(f)[1] + ':' locale = /.*\.([^.]{2,})\.yml$/.match(f)[1] + ':'
IO.foreach(f) do |line| IO.foreach(f) do |line|
line.strip!
next if line.start_with? "#" next if line.start_with? "#"
next if line.start_with? "---" next if line.start_with? "---"
next if line.strip!.blank? next if line..blank?
line.should eq locale line.should eq locale
break break
end end