Permalink
Browse files

Test using default option added for human_attribute_name

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

0 comments on commit b870d67

Please sign in to comment.