diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-12-05 13:26:14 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-12-05 13:26:14 -0200 |
commit | 7c920631ec3b314cfaa3a60d265de40cba3e8135 (patch) | |
tree | 54882a3e58ed18571b4dddef3ec09c5cc3a8e97e | |
parent | 33b0a30fcc5694d26034bc74ed61e34edecbfbc4 (diff) | |
download | rails-7c920631ec3b314cfaa3a60d265de40cba3e8135.tar.gz rails-7c920631ec3b314cfaa3a60d265de40cba3e8135.tar.bz2 rails-7c920631ec3b314cfaa3a60d265de40cba3e8135.zip |
Test using default option as symbol added for human_attribute_name
-rw-r--r-- | activemodel/test/cases/translation_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activemodel/test/cases/translation_test.rb b/activemodel/test/cases/translation_test.rb index 17c1083cf5..c299d6eb5e 100644 --- a/activemodel/test/cases/translation_test.rb +++ b/activemodel/test/cases/translation_test.rb @@ -21,6 +21,11 @@ class ActiveModelI18nTests < ActiveModel::TestCase assert_equal 'name default attribute', Person.human_attribute_name('name', :default => "name default attribute") end + def test_translated_model_attributes_using_default_option_as_symbol + I18n.backend.store_translations 'en', :default_name => 'name default attribute' + assert_equal 'name default attribute', Person.human_attribute_name('name', :default => :default_name) + end + def test_translated_model_attributes_falling_back_to_default assert_equal 'Name', Person.human_attribute_name('name') end |