[rspec-users] proposition: warn on rake spec - group :test

Rainer Kuhn ticktricktrack at gmail.com
Fri Jul 30 04:09:42 EDT 2010

That's not entirely true, there is a diffence between lot loaded and
not defined, let me show you:

This is without rspec in the dev group, so it does not show in rake -

~/work/myproject$ rake spec
(in /Users/rainerkuhn/work/myproject)

~/work/myproject$ rake IdontExist
(in /Users/rainerkuhn/work/myproject)
rake aborted!
Don't know how to build task 'IdontExist'

(See full trace by running task with --trace)

On Jul 29, 3:29 pm, David Chelimsky <dchelim... at gmail.com> wrote:
> On Jul 27, 2010, at 7:29 AM, Rainer Kuhn wrote:
> > Consider putting out some information on rake spec, when rspec ist
> > only defined in the :test group.
> > This just cost me an hour until I read the blog post explaining it.
> > Thing is, rake spec doesn't show on "rake -T" but it runs fine, just
> > not doing anything.
> > One line of output, like:
> > "Either use RAILS_ENV=test or put 'gem rspec' in the :development
> > group"
> > would be nice
> RSpec can't do anything if it's not loaded, which is the case when you run rake -T without rspec-rails in the :development group. I realize that this is new, but this is the way Rails-3 is supposed to work and we're all going to be learning how Gemfiles work for a while. Note that when you generate a new Rails-3 app (as of the release candidate), the generated Gemfile says this:
> # Bundle gems for the local environment. Make sure to
> # put test-only gems in this group so their generators
> # and rake tasks are available in development mode:
> # group :development, :test do
> #   gem 'webrat'
> # end
> HTH,
> David
> _______________________________________________
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list