I'm generally clear on bundler Gemfile options, but I'm not sure why rspec (specifically, rspec-rails) should be in both test and development.
Here are my test groupings:
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 ok?
Since version 0.9, Bundler has had a feature called "groups". The purpose of this feature is to allow you to specify groups of dependencies which may be used in certain situations, but not in others. Specifying groups allows you to do two things. First, you can install the gems in your Gemfile, minus specific groups.
RSpec is a testing tool for Ruby, created for behavior-driven development (BDD). It is the most frequently used testing library for Ruby in production applications. Even though it has a very rich and powerful DSL (domain-specific language), at its core it is a simple tool which you can start using rather quickly.
Summary: RSpec's subject is a special variable that refers to the object being tested. Expectations can be set on it implicitly, which supports one-line examples. It is clear to the reader in some idiomatic cases, but is otherwise hard to understand and should be avoided.
RSpec is a computer domain-specific language (DSL) (particular application domain) testing tool written in the programming language Ruby to test Ruby code. It is a behavior-driven development (BDD) framework which is extensively used in production applications.
I am quoting 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With