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
Brian, Have you tried autospec. It does almost exactly this. When used with spork it''s incredibly fast. -- Vishu Ramanathan co-founder thinklink llc 312.436.1627 new homepage! ---> thinklinkllc.com mocklinkr.com makes web mockups come to life thinklinkr.com is the web-based collaborative outliner On Mon, Nov 2, 2009 at 2:10 PM, BrianTheCoder <wbsmith83 at gmail.com> 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 > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091102/7cdc0e8e/attachment.html>
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 filesSpec::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