X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbd88d893f3c3fce9cafd666b94396988646d81f..d5e6acaaceb5e74a76369bdfb9413d26ba99e721:/test/lib/i18n_test.rb diff --git a/test/lib/i18n_test.rb b/test/lib/i18n_test.rb index 3ead036eb..3aa528ceb 100644 --- a/test/lib/i18n_test.rb +++ b/test/lib/i18n_test.rb @@ -13,7 +13,7 @@ class I18nTest < ActiveSupport::TestCase if default_value.is_a?(Hash) variables.push("count") - default_value.each do |_subkey, subvalue| + default_value.each_value do |subvalue| subvalue.scan(/%\{(\w+)\}/) do variables.push(Regexp.last_match(1)) end @@ -24,9 +24,7 @@ class I18nTest < ActiveSupport::TestCase end end - if key =~ /^(active(model|record)\.)?errors\./ - variables.push("attribute") - end + variables.push("attribute") if key =~ /^(active(model|record)\.)?errors\./ value = I18n.t(key, :locale => locale, :fallback => true)