[rspec-users] ruby file.spec?
zach.dennis at gmail.com
Thu Nov 12 23:15:03 EST 2009
On Thu, Nov 12, 2009 at 10:28 PM, Stephen Eley <sfeley at gmail.com> wrote:
> 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.
And in that case spec_helper.rb still needs to load spec/autorun for
this to work.
> (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
http://www.mutuallyhuman.com (hire me)
http://ideafoundry.info/behavior-driven-development (first rate BDD training)
More information about the rspec-users