Permalink
Browse files

Test using default option as symbol added for human_attribute_name

  • Loading branch information...
1 parent 33b0a30 commit 7c920631ec3b314cfaa3a60d265de40cba3e8135 @spastorino spastorino committed Dec 5, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 activemodel/test/cases/translation_test.rb
@@ -21,6 +21,11 @@ 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_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

0 comments on commit 7c92063

Please sign in to comment.