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

David Chelimsky dchelimsky at gmail.com
Thu Jul 29 09:29:27 EDT 2010

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


More information about the rspec-users mailing list