Forum: Ruby on Rails Tests failing in RC4

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.
dteare (Guest)
on 2005-11-12 12:50
(Received via mailing list)
Hi all,

After upgrading to RC4 all my test's fail with errors similar to the
following:

     ActiveRecord::StatementInvalid: Cannot delete or update a parent
row: a foreign key constraint fails: DELETE FROM developers
         /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/abstract_adapter.rb:67:in `log'
         /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/mysql_adapter.rb:155:in `execute'
         /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/mysql_adapter.rb:179:in `delete'
         /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/fixtures.rb:279:in `delete_existing_fixtures'
         /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/fixtures.rb:252:in `create_fixtures'

It's obvious that the FK constrains is preventing Rails from cleaning
up the DB tables after a test, but I don't know what to do about it.
Further confusing the issue is I set "use_transactional_fixtures" to
true, so it doesn't make sense to me why Rails would need to clean
out the DB after each test (since I thought it would just roll back).

Any help would be greatly appreciated.

Thanks!
--Dave.
This topic is locked and can not be replied to.