Displaying 1 result from an estimated 1 matches for "entrytest".
Did you mean:
entry_text
2006 Apr 28
1
Where to put localization strings
Hello!
I have a model that validates presence of the attribute title
class Entry < ActiveRecord::Base
validates_presence_of :title
:message => ''empty title is a no no''
end
I also have a test of this valitation.
class EntryTest < Test::Unit::TestCase
fixtures :entries
def test_validate_title
first = entries(1)
first.title = ''''
assert !first.save
assert_equal 1, first.errors.count
assert_equal ''empty title is a no no'', first.errors.on(:title)
end
end
The th...