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:
TypeError: {:rind=>#<Rind:0x4bdcfc8 @unsaved=false,
4f80300 @first_planungsdatum_change=false,
“updated_at”=>“2008-01-09 22:22:28”, “planungsdatum”=>“2009-05-19”,
nil, “todes_art_id”=>nil, “rind_mehrling_anzahl_id”=>nil,
", “rind_id”=>“6”, “hinten_links”=>“1”, “vorne_links”=>“1”,
nil, “land_id”=>nil, “lock_version”=>“0”, “bemerkung”=>nil,
s: Unbekannt”, “datum”=>nil, “type”=>"Rind
./test/unit/rind_tod_test.rb:53:in new' ./test/unit/rind_tod_test.rb:53:intest_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:

On Jan 10, 2008 7:58 AM, [email protected]
[email protected]


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.

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 =>
:rind => @my_rind)

Error is happening in CattleDeath.new()