diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-12-05 12:31:06 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-12-05 12:36:51 -0200 |
commit | b870d6729090865f0a21c2ea6b9f1fffdd1c4d7e (patch) | |
tree | 6047f6fa8ca48b09f8fd7a78735211681ac97d7e /activemodel/test/cases | |
parent | 48386d245bc169d3a36e5f305927bd968b108fea (diff) | |
download | rails-b870d6729090865f0a21c2ea6b9f1fffdd1c4d7e.tar.gz rails-b870d6729090865f0a21c2ea6b9f1fffdd1c4d7e.tar.bz2 rails-b870d6729090865f0a21c2ea6b9f1fffdd1c4d7e.zip |
Test using default option added for human_attribute_name
Diffstat (limited to 'activemodel/test/cases')
-rw-r--r-- | activemodel/test/cases/translation_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activemodel/test/cases/translation_test.rb b/activemodel/test/cases/translation_test.rb index ac2e56321e..f0cb02eb5c 100644 --- a/activemodel/test/cases/translation_test.rb +++ b/activemodel/test/cases/translation_test.rb @@ -17,6 +17,10 @@ class ActiveModelI18nTests < ActiveModel::TestCase assert_equal 'name default attribute', Person.human_attribute_name('name') end + def test_translated_model_attributes_using_default_option + assert_equal 'name default attribute', Person.human_attribute_name('name', :default => "name default attribute") + end + def test_translated_model_attributes_with_symbols I18n.backend.store_translations 'en', :activemodel => {:attributes => {:person => {:name => 'person name attribute'} } } assert_equal 'person name attribute', Person.human_attribute_name(:name) |