[rspec-users] What command to run all stories?

David Chelimsky dchelimsky at gmail.com
Sun Nov 18 10:22:06 EST 2007


On Nov 15, 2007 1:00 PM, Ed Howland <ed.howland at gmail.com> wrote:
> On Nov 15, 2007 12:30 PM, David Chelimsky <dchelimsky at gmail.com> wrote:
> > > ENV["RAILS_ENV"] = "test"
> > > require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
> > > require 'spec/rails/story_adapter'
> > > Dir[File.join(File.dirname(__FILE__), "steps/*.rb")].each do |file|
> > >   require file
> > > end
> > >
> > > I personally think that steps should be isolated from other stories.
> > > This seems to requre all steps in every story.
> >
> > It requires them all but doesn't expose them all in your story. Agreed
> > that each story should be limited in what it sees.
>
> David,
>
> Thanks for the info. Any directions you can point me to make :
>
> ruby stories/all.rb
>
> work? I think I am missing some require there. It is the stock one from trunk.

The one that gets generated by script/generate rspec should just work.
It requires every ruby file in the stories directory and any of its
subdirectories. As long as each file is also doing the requiring that
it needs (i.e. each file that runs specific stories requires
stories/helper.rb and helper.rb requires all the step definitions) you
should be fine.

David

>
> Thanks
> Ed
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list