[rspec-users] ruby file.spec?

Stephen Eley sfeley at gmail.com
Thu Nov 12 22:28:48 EST 2009

On Thu, Nov 12, 2009 at 8:36 PM, Zach Dennis <zach.dennis at gmail.com> wrote:
> You want to use "spec" to run files directly. If you have your heart
> set on running files from "ruby" then you'll need to load
> "spec/autorun" to actually execute the specs.

After giving the original querent a hard time, it surprises me to have
to tell you that you're wrong.  At least if you're running any spec
file written with the typical Railsish convention of requiring
'spec_helper.rb' at the top.  If for some reason you have spec files
that *don't* require the framework one way or another, you'd be
correct, but...why wouldn't you?  Otherwise, it works fine.

(How do I know?  I went into one of my projects, then into a spec
directory, and typed 'ruby user_spec.rb' and watched it work.  At
first I didn't think that trying things before posting to a mailing
list about them was an extraordinary act, but now I'm wondering if I
ought to get a medal for courage.)

Have Fun,
   Steve Eley (sfeley at gmail.com)
   ESCAPE POD - The Science Fiction Podcast Magazine

More information about the rspec-users mailing list