Re: assert_equal Test - how to test updates

vihrao
Wed, 03 Feb 2010 04:21:41 -0000

That is why I had this issue. I had two fixtures users.yml and gusers.yml.
Both had ''bob'' defined with same record ID. Now users.yml was
referred by
user controller and gusers.yml was referred by gusers controller. However
when I did assert_equal using gusers it pulled the record from the users
model instead of gusers model. I could not understand that behavior.
When I changed the gusers.yml ''bob'' to
''bob1'' it pulled the record from the
correct gusers model.

This tell me that we have make sure IDs are unique across fixtures from
different models. That is confusing each model has to have its own space.

--
View this message in context: