[rspec-users] driving rspec from a Ruby script

Matt Wynne matt at mattwynne.net
Sun Jan 18 13:40:40 EST 2009

On 18 Jan 2009, at 13:29, Ed Keith wrote:

> My problem is that I do not like the following line in Ruby :
>    system spec spec1.rb
> it looks very inefficient, so I am looking for a better solution.

I think you might be able to just do this instead:

     load 'spec1.rb'

Does that look any better?

Failing that, have a look at the source code for the 'spec' command -  
it's all Ruby - there will be something in there you can plagiarise,  
I'm sure.

Matt Wynne

More information about the rspec-users mailing list