[Rails] Design flaw with Fixtures?

Derek Haynes
2006-01-07T09:46:21Z

On a related note, something I''ve wondered about when defining foreign
key relationships in the database: should this even be done when we
can ensure relationships using validation methods? It seems like this
is a violation of DRY unless another application needs to directly
interact with the database.

- Derek

On 1/6/06, Rick Bradley <rick@rickbradley.com>
wrote:
> * Craig Hockenberry (craig@iconfactory.com) [060106 18:51]:
> > I''ve been trying to add unit testing for collection of models
with
> > complex relationships -- and failing miserably.
> >
> > Because of the complexity of the relationships, I''m using a
database
> > which validates foreign key constraints (PostgreSQL 8).
> >
> > I''m finding it nearly impossible to generate tests that are
independent
> > of each other. The basic problem is the DELETE then INSERT nature of
> > #create_fixtures.
>
> Please have a look at:  http://dev.rubyonrails.org/ticket/2404
>
>
> Rick
> --
>  http://www.rickbradley.com    MUPRN: 639
>                        |  there should be a
>    random email haiku  |  maximum length (e.g. bytes)
>                        |  of that descriptions.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Derek Haynes
HighGroove Studios - http://www.highgroove.com
Atlanta, GA
Keeping it Simple.
404.593.4879