我最初创建的项目不包括测试,现在我想对我的Web应用程序进行测试。我的申请并不广泛,但它足够大,以至于我不想重新启动这个项目。
是否像创建文件夹一样简单' test'在应用程序目录中?
我还需要在程序的其他部分调整其他内容吗?
提前致谢。
答案 0 :(得分:0)
One option is just choose a test framework and add it to your app (probably adding just a gem and runing some rake task depending of the framework)
Another option is edit config/application.rb
and uncomment the line:
# require "rails/test_unit/railtie"
Also you can create an empty rails project and compare your current app with the empty one an copy/modify the files different: Probably just config/application.rb
and test/test_helper.rb