We have a development database that has quite a few non-Rails convention
names for tables and fields. Also we have quite a few primary-foreign
key relationships. This database has been inherited from a legacy
system. However, when we run the rspec then Rails runs a
db:test:prepare that loads the
I guess another option would be to create our own schema.rb for the
structure of our database and somehow amend the database.rake file to
take this schema.rb instead of the one that gets generated via
migrations. However, I'm not sure how I would do that and even if
that's a good idea.
--
Po
Thanks, that is close to what I'm looking for. Where do I put the code
for this, in the rspec.rake or in a separate rake file in my lib/tasks
folder? I'm probably a step above a newbie so sorry if this sounds too
rudimentary.
--
Posted via http://www.ruby-forum.com/.
_
What I had also done is commented this line out of my rspec.rake.
spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config',
'database.yml')) ? "db:test:prepare" : :noop
Which I am assuming is running a db:test:prepare as a prerequisite for
running the rspecs.
So will the new code I write for t