X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/124ec2e9d560e0df291e5a8e5aa67ef5db2f5d46..fbbabeff1e3bc473720e6eaece83825a9c349ba8:/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)