[rspec-users] spec for Rails library

Tom Stuart tom at experthuman.com
Fri Jul 13 17:12:06 EDT 2007


On 13 Jul 2007, at 20:31, Gregory Murphy wrote:
> I'm referring in particular to RSpec for Rails. It generates a
> number of directories in a Rails app, with a place for model specs,  
> for
> example, and a rake task to run them, e.g. 'rake spec:models'. But  
> there
> is no place and no task for library tests.

Put them wherever you want -- most people seem to use spec/lib (cf  
http://rubyforge.org/pipermail/rspec-users/2007-June/002069.html).  
They'll get run by "rake spec" along with everything else; add :libs  
to the "[:models, :controllers, :views, :helpers].each" line in  
vendor/plugins/rspec_on_rails/tasks/rspec.rake if you want to be able  
to say "rake spec:libs".

Cheers,
-Tom


More information about the rspec-users mailing list