无效选项: - autospec

时间:2010-04-21 22:10:45

标签: ruby-on-rails build-automation rspec cucumber autotest

/usr/local/bin/ruby -rrubygems -e "require 'redgreen'"  /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec --autospec <files_here> -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.

我在这里缺少什么?

2 个答案:

答案 0 :(得分:2)

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

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

评论行和“autospec”,“autotest”和“cucumber”工作正常。

答案 1 :(得分:2)

你可以有条件地要求redgreen

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

您可以在 spec.opts 文件中传递 - 颜色,从而在rspec中获得彩色输出