I use fixtures to upload entries in my db. Actually, I have some
fixed informations I need to use in my application, so I have done a
migration_file for this. To upload it in my test_db, I use a script to
copy entries from my development database into yml fixtures files and I
run rake db:fixtures:load. Is this the right way to do a 'rake
db:migrate' in test environment ?
But, anyway, I've got some errors: the rake abords
I have some 'BIGBOSS = Person.find_by_name('admin').name' in my AR models.
Running 'rake --trace' shows me that he doesn't find the entry 'admin'.
But the db:fixtures:load works because the entry 'admin' exists in my table.
(Ok I can write a 'BIGBOSS = Person.find_by_name('admin')', not to have
the error when the model is loading but it will occure later)
Finally, when you run '--trace', a 'rake db:schema:import' is shown.
Does it creates a 'schema.rb' for tests? Actually, where does it find
the schema since at first time the test db is empty and you don't have
any 'rake db:migrate:test'?
What's wrong we me and the understanding of unit:tests?