Type error in unit test


I ve got a really strange issue with one of my test unit files...

When I run that test unit I get a Type Error: test_planned_records_with_done_records(RindTod): TypeError: {:rind=>#<Rind:0x4bdcfc8 @unsaved=false, @rind_daten=[#<RindBrunst:0x 4f80300 @first_planungsdatum_change=false, @attributes={"test_ergebnis_id"=>"2", "updated_at"=>"2008-01-09 22:22:28", "planungsdatum"=>"2009-05-19", "gewicht"=> nil, "todes_art_id"=>nil, "rind_mehrling_anzahl_id"=>nil, "planungsregel_id"=>"3 ", "rind_id"=>"6", "hinten_links"=>"1", "vorne_links"=>"1", "start_laktzyklus"=> nil, "land_id"=>nil, "lock_version"=>"0", "bemerkung"=>nil, "kurzinfo"=>"Ergebni s: Unbekannt", "datum"=>nil, "type"=>"Rind     ./test/unit/rind_tod_test.rb:53:in `new'     ./test/unit/rind_tod_test.rb:53:in `test_planned_records_with_done_records'

I ve got absolutely no idea why that error is happening.

Maybe anybody has an idea what might be the reason?

Thanks a lot.

Can you show us the code around line 53 in this file please: ./test/unit/rind_tod_test.rb

Sorry, it took so long to answer....

@my_cattle = Cattle.find_by_name("lisa") my_tod = CattleDeath.new(:planungsdatum => Date.today + 20,                                :datum => Date.today + 20,                                :todes_art => TodesArt.find_by_hit_code_nr(1),                                :rind => @my_rind) my_tod.save!

Error is happening in CattleDeath.new()