Displaying 1 result from an estimated 1 matches for "servicetest".
Did you mean:
servicehost
2006 Feb 10
1
Bizarre ActiveRecord::Errors/validation problem
...t.column :id, :primary_key
t.column :name, :string, :ilmit => 5, :null => false
t.column :port, :integer, :null => false
t.column :status, :string
end
The model:
class Service < ActiveRecord::Base
validates_presence_of :name, :port, :status
end
The unit tests:
class ServiceTest < Test::Unit::TestCase
def test_new_service
@service = Service.new
@service.name = ''www''
@service.port = 80
@service.status = ''Unknown''
assert @service.save
end
def test_invalid_service
@service = Servic...