Rails: rake db:test:prepare Vs rake test:prepare [英] Rails: rake db:test:prepare Vs rake test:prepare

查看:60
本文介绍了Rails: rake db:test:prepare Vs rake test:prepare的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为指南,用于准备测试数据库的命令是

AS the guides, the command used to prepare test database is

bundle exec rake db:test:prepare

但是,我发现以下命令也有效&为我创建了测试数据库.

However, I have found that following command also works & created the test db for me.

bundle exec rake test:prepare

想知道这是否是一个有效的命令,如果是的话.我在哪里可以找到文档.

Wanted to know if this is a valid command, if yes. Where can I find the documentation.

rails 3.2.8

推荐答案

根据 github 和源代码 task 'test:prepare' =>'db:test:prepare' 在底部提到.

According to github and the source code task 'test:prepare' => 'db:test:prepare' is mentioned at the bottom.

因此,它是一个快捷方式、包装器,无论您想怎么称呼它.另一个问题是为什么当你执行 bundle exec rake -T 但嘿.

Hence it's a shortcut, wrapper, whatever you want to call it. Another question would be why this doesn't up when you do bundle exec rake -T but hey.

这篇关于Rails: rake db:test:prepare Vs rake test:prepare的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆