Forum: Ruby on Rails Tests failing in RC4

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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

     ActiveRecord::StatementInvalid: Cannot delete or update a parent
row: a foreign key constraint fails: DELETE FROM developers
active_record/connection_adapters/abstract_adapter.rb:67:in `log'
active_record/connection_adapters/mysql_adapter.rb:155:in `execute'
active_record/connection_adapters/mysql_adapter.rb:179:in `delete'
active_record/fixtures.rb:279:in `delete_existing_fixtures'
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.

This topic is locked and can not be replied to.