Why do people group rspec under testing and development in the gemfile?

I generally understand the Gemfile options for bundler, but I'm not sure why rspec (in particular rspec-rails) should be in both the test and the development.

Here are my test groups:

group :development, :test do gem 'rspec-rails' gem 'faker' end group :test do gem "factory_girl_rails" gem "capybara" gem 'guard-rspec' gem 'rb-fsevent' gem 'growl' end 

Does this look normal?

+24
ruby-on-rails rspec
May 2 '12 at 12:14
source share
1 answer

I quote the official documentation :

Add rspec-rails to the: test and: development groups in the Gemfile:

 group :test, :development do gem "rspec-rails", "~> 2.6" end 

It must be in the: development group to expose the generators and the rake of the task without entering RAILS_ENV = test.

+27
May 2, '12 at 12:17
source share



All Articles