aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-04-28 11:23:29 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-04-28 11:23:29 -0300
commitcafe6a38f5478403bf249ec9a9a39ff836849ff7 (patch)
tree951d1a36354beefdfb41b524ae0a8fcc82434758 /activemodel/test
parent9fc9e894771d1915fe3e565305424ed9ca537b79 (diff)
downloadrails-cafe6a38f5478403bf249ec9a9a39ff836849ff7.tar.gz
rails-cafe6a38f5478403bf249ec9a9a39ff836849ff7.tar.bz2
rails-cafe6a38f5478403bf249ec9a9a39ff836849ff7.zip
Do not modify options hash in human_attribute_name, remove reverse_merge
Diffstat (limited to 'activemodel/test')
-rw-r--r--activemodel/test/cases/translation_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/activemodel/test/cases/translation_test.rb b/activemodel/test/cases/translation_test.rb
index 54e86d48db..4999583802 100644
--- a/activemodel/test/cases/translation_test.rb
+++ b/activemodel/test/cases/translation_test.rb
@@ -82,9 +82,15 @@ class ActiveModelI18nTests < ActiveModel::TestCase
end
def test_human_does_not_modify_options
- options = {:default => 'person model'}
+ options = { :default => 'person model' }
Person.model_name.human(options)
- assert_equal({:default => 'person model'}, options)
+ assert_equal({ :default => 'person model' }, options)
+ end
+
+ def test_human_attribute_name_does_not_modify_options
+ options = { :default => 'Cool gender' }
+ Person.human_attribute_name('gender', options)
+ assert_equal({ :default => 'Cool gender' }, options)
end
end