无效选项:--autospec

发布于 2024-08-29 22:58:05 字数 456 浏览 3 评论 0原文

/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.

我在这里缺少什么?

/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.

What am I missing here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

中性美 2024-09-05 22:58:05

我终于在周末有时间自己研究一下这个问题。

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

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

I finally got some time during the weekend to look into this myself.

The problem is "require 'redgreen/autotest'" statement in .autotest file
I keep my autotest configuration in ~/.autotest

Comment that row and "autospec", "autotest", and "cucumber" works ok.

眼眸里的快感 2024-09-05 22:58:05

您可以有条件地要求 redgreen

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

您可以通过在 spec.opts 文件中传递 --color 在 rspec 中获得彩色输出

You can just require redgreen conditionally

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

You can have coloured output in rspec by passing --color in your spec.opts file

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文