Topic: Coerce rspec to run db:test:clone_structure
We have a legacy type database with many foreign key constraints. If we just do the schema load from schema.rb things don't translate very well. However, I have found running db:test:clone_structure as an individual rake task will generate the proper schema. But how do I get this to run within the rspec.rake task? This file has a lot of pre-generated code that I'm scared to change.
I do not consider myself an expert by any stretch.
I want to be able to call db:test:clone_structure within this rspec.rake so that I can guarantee the correct structure gets generated BEFORE any rspecs are run.
Thanks for anything that can point me in the right direction.