我通常很清楚 bundler Gemfile 选项,但我不确定为什么 rspec(特别是 rspec-rails)应该同时用于测试和开发。
这是我的测试分组:
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
这看起来好吗?
最佳答案
我在引用 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 needs to be in the :development group to expose generators and rake tasks without having to type RAILS_ENV=test.
关于ruby-on-rails - 为什么人们在 Gemfile 中对 rspec 进行测试和开发?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10413534/