How do I run Rails integration tests without dropping DB contents?

后端 未结 4 1892
故里飘歌
故里飘歌 2021-01-02 04:22

I\'ve written some integration tests that I\'d like to run against a copy of my prod database before I push to production. This lets me test all of my routes are still corre

4条回答
  •  感情败类
    2021-01-02 04:33

    Setting self.use_transactional_fixtures = true in your integration tests would be useful as well if you don't want to have to reload the production copy between each execution of the test.

    Otherwise, the integration test run will splat the data with whatever changes it makes.

提交回复
热议问题