[rspec-users] spec runner

David Chelimsky dchelimsky at gmail.com
Mon Nov 2 17:40:47 EST 2009


On Nov 2, 2009, at 3:10 PM, BrianTheCoder wrote:

> How do I just invoke the spec runner through code? I have a watchr
> file that I want to run the specs when files change, but I am shelling
> out right now, so i though i'd speed it up by keeping it ruby.  I
> tried digging through the spec file, but lost while digging through
> the files

Spec::Runner::CommandLine.run(Spec::Runner::OptionParser.parse(argv,  
err, out))

* argv should be the args you would otherwise pass in on the command  
line
* err is normally STDERR, but can be whatever you want for an error  
stream
* out is normally STDOUT, but can be whatever you want for an output  
stream

HTH,
David





More information about the rspec-users mailing list