mehulkar
mehulkar

Reputation: 4974

Rspec pass configuration options in terminal command

I would like to pass config options when running rspec from terminal, as opposed to setting them in a file that rspec reads from.

My spec_helper specifies config.order='random', so I need to override this.

The use case is generating a command to use in a rake task (to generate documentation).

I've tried:

rspec spec/ --config.order default

but --config is an invalid option

Upvotes: 0

Views: 122

Answers (1)

Steve
Steve

Reputation: 15736

Try:

rspec spec --order default

Generally most of the command line options take the form --<option-name> <value>. See rspec --help for the details.

Upvotes: 1

Related Questions