Generate only tests from existing model / controllers

前端 未结 3 637
借酒劲吻你
借酒劲吻你 2020-12-31 02:26

I have a Rails3 app that is based on someone else\'s work. For some reason they decided not to supply the tests with the app, which I am finding frustrating.

What I

3条回答
  •  余生分开走
    2020-12-31 03:08

    I know it's a little old, but you can do this:

    rails g scaffold Post -s
    

    The -s makes it skip the files already created. Also, if you don't use the flag it just asks you if you want to override the file, so, no worries.

提交回复
热议问题