It sounds like you want to use your own DB cloning to load up your
schema and data to avoid problems with fixtures and FK constraints.
Using my handy Rake addition, you could do something like this in your
clone_task = Rake::Task.lookup(:clone_structure_to_test)
You would write the ‘my_custom_db_dump’ task to save the entire database
contents, not just the schema, to the .sql file that the
‘clone_structure_to_test’ task is looking for.
Or you could work at the next level up to replace the
‘clone_structure_to_test’ task with your own that runs a shell script to
copy one database to another.