无效选项: – autospec

/usr/local/bin/ruby -rrubygems -e "require 'redgreen'" /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec --autospec  -O spec/spec.opts invalid option: --autospec Test::Unit automatic runner. Usage: -e [options] [-- untouched arguments] which spec says "/usr/local/bin/spec" which autospec says "/usr/local/bin/autospec" /usr/local/bin/spec --help includes --autospec option in the list. 

我在这里想念的是什么?

我终于在周末有一段时间自己调查一下。

问题是.autotest文件中的“require’redgreen / autotest’”语句我将自动测试配置保存在〜/ .autotest中

注释行和“autospec”,“autotest”和“cucumber”工作正常。

你可以有条件地要求红绿

 require 'redgreen/autotest' unless ENV['RSPEC'] 

您可以通过在spec.opts文件中传递–color来在rspec中使用彩色输出