我试图通过ruby test/unit/mytest.rb运行单个测试,但我总是得到一个“no such file to load - test_helper”错误。谷歌提出了一些建议,但他们都没有为我工作。我跑的Rails 3.0的Ruby 1.9.2(通过RVM)在Ubuntu 10.10Rails tests can not find test_helper
这是我到目前为止已经试过 - 任何建议,非常感谢
- 改变了“需要test_helper”到“需要File.dirname(FILE)+ test/unit/mytest_test.rb中的“/../test_helper” “。它带回“没有这样的文件来加载 - 测试/单元/../ test_helper”
- 试图运行RVM测试/单元/ mytest_test.rb同上
- 试图运行红宝石-I试验/单元/ mytest_test。 RB。没有消息到终端。大约5分钟后,等待发生的事情,按Ctrl + c'd它
任何建议非常赞赏 - 我很难过。
胆碱!太棒了 - 非常感谢。 – PlankTon 2010-10-17 04:13:39
ruby -Itest test/unit/person_test.rb。参考:http://guides.rubyonrails.org/testing.html#running-tests – 2013-01-22 09:25:38
唯一的区别是你在什么目前的目录... – DGM 2013-01-22 15:08:09