Rails - Populate test database with development data

后端 未结 6 1142
没有蜡笔的小新
没有蜡笔的小新 2021-01-31 19:25

Is there any trivial way to copy the data from developmenet database into the test one? I know theres a way to copy schema and recreate database, but is there any rake task to p

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 20:07

    For all databases:

    rake db:test:clone && rake db:seed RAILS_ENV='test'
    

提交回复
热议问题