Forum: Ruby on Rails HELP WITH MANY TO MANY IN FIXTURES

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Skriloff, Nicholas (Guest)
on 2006-03-20 23:42
(Received via mailing list)
I have three tables,

Courses (like finance 101)
Courses_modules (many to many link table)
Modules ( a part of a course like a module on supply and demand)

In my Module test when I have the line

class ModuleTest < Test::Unit::TestCase
  fixtures :course_modules , :modules

The order that is happening is course_modules are deleted and then
course_modules.yml file is called and inserts values.  Then modules is
called and gets a foreign key violation on delete.  How do I avoid this
when testing a many to many relationship?
This topic is locked and can not be replied to.