Closed paul-mesnilgrente closed 4 years ago
Answered in #76 but copying here:
Right now I think the best solution to this would be what Commander's own specs use - take a look at #new_command_runner
in spec/spec_helper.rb
which includes this line:
Commander::Runner.instance_variable_set :"@singleton", Commander::Runner.new(args)
That allows you to run specs with arbitrary arguments by passing them in to a setup method.
I know that's a little clunky — if you're motivated enough to submit a pull request to provide a better interface, I'd be glad to take a look!
Hope that helps!
Hi,
Is it possible to use this library with a custom Array instead of ARGV? I couldn't find any example of it and I can't figure out the code :/