spec runner

View: New views
3 Messages — Rating Filter:   Alert me  

spec runner

by wbsmith83@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: spec runner

by Vishu Ramanathan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...
http://rubyforge.org/mailman/listinfo/rspec-users




_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: spec runner

by David Chelimsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users