Hello all,
i have a problem with unit test always
here my code for create a table
1 def test_should_create_a_member
2 sp = Member.new(:name => "Arnold", :surname => "Stallone", :street
=> "My Street", :location => "Washington")
3 assert sp.save # here is failure
4 end
if i make the test, its ok, without failures
then i write next test:
1 def test_name_should_be_unique
2 sp = Member.new(:name => "Silvester", :surname => "Mc Name", :street
=> "Our Street", :location => "Customs")
3 assert sp.save
4 sp = Member.new(:name => "Silvester", :surname => "Field",
:street => "This Street", :location => "Living")
5 assert !sp.save
6 end
if i make tesst there ist 1 failure on line 3 in
test_should_create_a_member.
can someone see any false, why this is so now?
please help