/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.
我在这里缺少什么?
答案 0 :(得分:2)
周末我终于有时间自己调查一下。
问题是.autotest文件中的“require'redgreen / autotest'”语句 我将自动测试配置保存在〜/ .autotest
中评论行和“autospec”,“autotest”和“cucumber”工作正常。
答案 1 :(得分:2)
你可以有条件地要求redgreen
require 'redgreen/autotest' unless ENV['RSPEC']
您可以在 spec.opts 文件中传递 - 颜色,从而在rspec中获得彩色输出