We have a shell script which launches our RSpec tests. It looks something like this:
args+=(
"--format" "html"
"--out" "$to_dir/index.html"
)
"$rspec_dir/rspec" "${args[@]}" "$tests_to_run"
exit $?
When trying to upgrade RSpec, I'm getting an error that the :should
syntax is deprecated, and we need to explicitly enable it like so: How to avoid deprecation warning for stub_chain in RSpec 3.0?
However, since we're not using Rake, I need to figure out a way to do this when launching rspec through the command line. But when I try adjusting the command line options like so:
./rspec --format "html" --out "index.html" --syntax ":should"
It says --syntax
is not a valid option. How can I enable this deprecated syntax while invoking rspec directly through the command line?
(We can't use Rake because our internal build tools don't support it. That's why I need to find out how to do this through the command line.)