How do I save updates to a database to both test and development environments?
I have a document that I use to set up definitions of stats, and updates to those definitions are needed on both my test and development environments.
I'd rather not have a separate step where I seed my test server by dumping the tabl开发者_运维技巧e from the development server whenever it runs. So is there a way to specify that an action performed on the document should be performed in both environments?
If you're using sqlite, you can just copy the database file before running your tests. If you're using mysql you could use replication to keep your test database up to date. Note that this is not the rails way; when you run your tests the default behavior is to recreate the test db from scratch
精彩评论