Permalink
Browse files

Test falling back to default added for human_attribute_name

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

0 comments on commit 0dbf4ac

Please sign in to comment.