Invalid option: --autospec

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

+3
source share
2 answers

I finally got some time on the weekend to look at it myself.

The problem is requiring "require" redgreen / autotest "" in the .autotest file. I save the autotest configuration in ~ / .autotest

Comment that the lines and "autospec", "autotest" and "cucumber" work fine.

+2
source

You can just require redgreen conditionally

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

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

+2

Source: https://habr.com/ru/post/1742183/


All Articles