Hi,
Just noting (as I start to use unit tests) that when I issue “rake
db:test:prepare” that what I do NOT see in my test database (as I do in
development when running “rake db:migrate”):
(a) FK constraints don’t seem to be put in place in my test database.
Extract from the migration
def self.up
down
directory = File.join(File.dirname(FILE), “dev_data”)
Fixtures.create_fixtures(directory, “donations”)
Fixtures.create_fixtures(directory, “donation_events”)
Fixtures.create_fixtures(directory, “comments”)
end
(b) Test Data wasn’t loaded - I had one of my migrations that had test
data
I was loading. This didn’t seem to get loaded.
Is this expected? Should “rake db:test:prepare” not emulate the same as
running “rake db:migrate” in development?
Thanks
Greg