2011-01-27 95 views
5

当我运行rake - T时,发现缺少rake test。我需要做什么才能完成这项任务?具体来说,我想运行rake test:benchmark,但似乎没有加载。例如...如何将'rake test'添加到项目

$rake test:benchmark 

rake aborted! 
Don't know how to build task 'test:benchmark' 

回答

9

config/application.rb文件丢失这一行:

require 'rails/all' 
3

你只需要:

require "rails/test_unit/railtie"

config/application.rb