[rspec-users] can't get (r)spec to work in non-rails project

Steve vertebrate at gmail.com
Sat Feb 16 13:26:49 EST 2008

On Sat, 16 Feb 2008 13:06:00 -0500, David Chelimsky wrote:
> The rspec/rails plugin works because there are generators which create
> the files for you, not because of any auto-loading facility. The
> generated files have require statements that get you the right stuff.
> We could conceivably add generators for other-than-rails apps. The
> reason we have them in rails apps is because there is already a
> generation facility that is easy to hook into.
> If we were to add generators, how do you think they should work? Where
> should they live? Part of the spec command? A new shell command? A
> separate plugin?

I would think just have the spec_helper.rb file for the specs try to load 
config/rspec.rb or something along those lines. Similar to how rspec for 
rails just loads the rails env. It would then be up to the user to do the 
necessary loading in that file. There's really no way to know what crazy 
way someone might layout their projects.


More information about the rspec-users mailing list