[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  
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".


More information about the rspec-users mailing list