X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/baf10cd39289cd7e94a819305e46f43e85a136c6..a539efd4e5f1664bbde664b2470ce54291724c65:/test/lib/i18n_test.rb?ds=sidebyside diff --git a/test/lib/i18n_test.rb b/test/lib/i18n_test.rb index e8fcb687e..09965e950 100644 --- a/test/lib/i18n_test.rb +++ b/test/lib/i18n_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require "test_helper" class I18nTest < ActiveSupport::TestCase I18n.available_locales.each do |locale| @@ -34,10 +34,10 @@ class I18nTest < ActiveSupport::TestCase value.each do |subkey, subvalue| # assert plural_keys.include?(subkey), "#{key}.#{subkey} is not a valid plural key" - unless subvalue.nil? - subvalue.scan(/%\{(\w+)\}/) do - assert variables.include?($1), "#{key}.#{subkey} uses unknown interpolation variable #{$1}" - end + next if subvalue.nil? + + subvalue.scan(/%\{(\w+)\}/) do + assert variables.include?($1), "#{key}.#{subkey} uses unknown interpolation variable #{$1}" end end else