]> git.openstreetmap.org Git - rails.git/blobdiff - test/lib/i18n_test.rb
Merge branch 'master' into next
[rails.git] / test / lib / i18n_test.rb
index 3ead036ebc9a56401b7c4d4dfbe330e775afdd26..3aa528ceb819db6244b9e54b7b971d005657cb23 100644 (file)
@@ -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)