diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-12-05 12:32:29 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-12-05 12:36:53 -0200 |
commit | 0dbf4ac709c0c31d4d6664bcb53b861c6d6b0157 (patch) | |
tree | 3c5c9e7135678c800d06b9121a486b831ca42bc3 /activemodel | |
parent | b870d6729090865f0a21c2ea6b9f1fffdd1c4d7e (diff) | |
download | rails-0dbf4ac709c0c31d4d6664bcb53b861c6d6b0157.tar.gz rails-0dbf4ac709c0c31d4d6664bcb53b861c6d6b0157.tar.bz2 rails-0dbf4ac709c0c31d4d6664bcb53b861c6d6b0157.zip |
Test falling back to default added for human_attribute_name
Diffstat (limited to 'activemodel')
-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 f0cb02eb5c..da6cb98bc9 100644 --- a/activemodel/test/cases/translation_test.rb +++ b/activemodel/test/cases/translation_test.rb @@ -21,6 +21,10 @@ class ActiveModelI18nTests < ActiveModel::TestCase assert_equal 'name default attribute', Person.human_attribute_name('name', :default => "name default attribute") end + def test_translated_model_attributes_falling_back_to_default + assert_equal 'Name', Person.human_attribute_name('name') + 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) |