X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8f7ecf169a3f15e125ffce2f1da219a4ef878f16..d38e476fa66a69285639ca4d6f94f7aa676e1d88:/test/unit/i18n_test.rb?ds=sidebyside diff --git a/test/unit/i18n_test.rb b/test/unit/i18n_test.rb index 73f893455..c1dacbff2 100644 --- a/test/unit/i18n_test.rb +++ b/test/unit/i18n_test.rb @@ -30,8 +30,10 @@ class I18nTest < ActiveSupport::TestCase value.each do |subkey,subvalue| # assert plural_keys.include?(subkey), "#{key}.#{subkey} is not a valid plural key" - subvalue.scan(/%\{(\w+)\}/) do - assert variables.include?($1), "#{key}.#{subkey} uses unknown interpolation variable #{$1}" + unless subvalue.nil? + subvalue.scan(/%\{(\w+)\}/) do + assert variables.include?($1), "#{key}.#{subkey} uses unknown interpolation variable #{$1}" + end end end else