puppetlabs/puppet-dashboard — pull request #67 by mmrobins (2011-11-22 10:05:57+00:00)
Title: (#6717) Fix failing dependency destroy tests

Now that there are foreign key constraints in the database that do
cascading deletes, the test database needs to have those constraints
too. Currently, db:test:prepare is called before every spec run, which
copies schema.rb into the test database without the constraints.
Switching to db:test:clone_structure gets the schema from the dev
database which will have the right constraints.

Another possible option was to change the schema to be sql instead of
ruby, but the option to do so is currently broken.

Another possibility in the future may be to use the foreigner plugin so
that constraints can be specifiec in migrations more easily.
https://github.com/matthuhiggins/foreigner