ruby-on-rails – Guard spork Rspec问题 – 如何删除Test :: Unit的钩子?

我在Ubuntu 12.04上的rails 3.2.11项目上运行了guard-spork.

我从railstutorial.org获得了配置.

Spork开始,然后后卫说它找不到spork开始,等待30秒,然后60秒,然后工作.

它可以工作,但每次都会出错.只是想知道我做错了什么.

如何删除Test :: Unit的钩子?

错误信息:

16:31:58 - INFO - Starting Spork for RSpec,Test::Unit
Using RSpec
preloading Rails environment
Couldn't find a supported test framework that begins with 'testunit'

Supported test frameworks:
( ) Cucumber
(*) RSpec

Legend: ( ) - not detected in project   (*) - detected
Loading Spork.prefork block...
Rack::File headers parameter replaces cache_control after Rack 1.5.
Spork is ready and listening on 8989!
16:32:28 - ERROR - Could not start Spork server for RSpec,Test::Unit after 30 seconds. I will continue waiting for a further 60 seconds.

16:33:28 - ERROR - Could not start Spork server for RSpec,Test::Unit. Make sure you can use it manually first.

解决方法

或者你可以添加test_unit:false作为guard-spork的选项,即在你的Guardfile中:
guard 'spork',:rspec_env => { 'RAILS_ENV' => 'test' },:test_unit => false do

我在’test’目录中执行了一些性能测试,因此删除test /并不总是一个选项.

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...