I have spent sometime this afternoon learning how to unit test rails
applications and integrate the Cerberus CI tool. One key area confuses
me however, and I would appreciate other peoples views of how best to
overcome the issue.
My understanding is that the ‘test’ and ‘test:units’ have the
db:test:prepare pre-requisite which copies the schema from dev to the
test database. I would prefer to use migrations to perform the building
of the test schema, and I have tried
‘http://snippets.dzone.com/posts/show/2031’ to use migration building.
However, this still attempts to use ‘dropdb’ and ‘createdb’ commands
when using the rake test. I know this is some kind of setup /
registration problem, but I wanted confirmation that these kind of
‘tweaks’ to the rails app is the best way of implementing the migration
control over the test db.
What are your thoughts and apologies if there are similar posts on this
topic, but I have spent some time searching!!!