How to generate fixtures based on my development database?

后端 未结 3 1031
花落未央
花落未央 2021-02-05 04:07

I\'m lazy and I since my production database has data I could use for testing through on going development, I was wondering if there were any easy methods of ge

3条回答
  •  不知归路
    2021-02-05 04:39

    You really can Google this. "rails create fixture from database". First hit: http://snippets.dzone.com/posts/show/2525. But you will be generating what I think will be brittle tests. Consider using fixture replacements. Like Fixjour, Factory Girl, or Machinist. They will help you think about what kind of edge cases you are throwing at your code. Just a thought.

提交回复
热议问题