Rails 3 - 如果我使用 RSpec,我可以删除“test"文件夹吗? [英] Rails 3 - If I'm using RSpec, can I just delete the 'test' folder?
问题描述
尝试迁移时,我不断收到此错误:
While trying to migrate, I keep getting this error:
rake aborted!
test-unit is not part of the bundle. Add it to Gemfile.
如果我使用 RSpec,我可以完全删除测试文件夹吗?
If I'm using RSpec, can I just delete the test folder altogether?
推荐答案
这个错误意味着在你的项目中的某个地方有一个 require test-unit
没有在 Gemfile<中指定它/代码>.
This error means that somewhere inside your project there is a require test-unit
without it being specified in the Gemfile
.
因此,您实际上应该尝试找到该语句并将其删除以修复此错误(或将依赖项添加到 gemfile -- 但如果您不使用它,这听起来有点倒退).
So you should actually try to find that statement and remove it to fix this error (or add the dependency to the gemfile --but that sounds a bit backwards if you are not using it).
无论如何:如果您使用 rspec
,您绝对可以删除 test
文件夹.
Anyway: you can definitely remove the test
folder if you are using rspec
.
这篇关于Rails 3 - 如果我使用 RSpec,我可以删除“test"文件夹吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!