You can always run the runner programmatically instead, rather than shelling out. Someone is trying to do something similar to you here:
The issue is not that this cannot be provided, its more that your are trying to use the configuration to provide command line configuration cannot be provided, its that its not cleared. The runner takes a list of files Jon Rowe --------------------------- [email protected] jonrowe.co.uk On 13 April 2020 at 10:43, Eric Kessler wrote: > So I dug into the RSpec code a little more and I did find a 'solution'. While > `config.files_to_run = ['path/to/a_spec.rb[1:1:2:1:1:1]']` will run into > loading issues, `config.instance_variable_set(:@files_or_directories_to_run , > ['path/to/a_spec.rb[1:1:2:1:1:1]'])` will work. This seems to be because > `@files_or_directories_to_run` is where the paths provided on the command > line are stored when the command is parsed. > > It's odd that, essentially, some kinds of configuration can only be provided > via the command line, instead of any needed configuration being possible via > the configuration object in code form. > > > Eric K > > On Sunday, April 12, 2020 at 8:43:01 PM UTC-7, Eric Kessler wrote: -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/dejalu-217-9a3f23cc-e383-4158-a7e7-a395f109d08a%40jonrowe.co.uk.
