Skip to content

Include SPEC_OPTS in bisect reproduction command

Created by: urbanautomaton

Previously the following command:

SPEC_OPTS="--bisect --seed 123" rspec blah_spec.rb

would return a repro command something like:

rspec blah_spec.rb[1:2,1:5]

To reliably run in the correct order, we need to include the seed from SPEC_OPTS - this patch adds this to the repro command, to now return:

SPEC_OPTS="--seed 123" rspec blah_spec.rb[1:2,1:5]

To keep the cukes passing I've had to exclude the bisect feature from the should/should_not prevention; this uses SPEC_OPTS to load a support file, which then shows up in the repro command produced by the cukes.

Rather than add the @allow-should-syntax tag to these cukes I've introduced a new @with-clean-spec-opts tag to try to communicate the intention better, even though it just controls the same hook as the existing tag. Does that seem reasonable?

Merge request reports