Closed jendiamond closed 8 years ago
https://rubygems.org/gems/simplecov/versions/0.12.0 https://github.com/colszowka/simplecov
https://github.com/rspec/rspec-rails https://rubygems.org/gems/rspec-rails/versions/3.5.1
https://rubygems.org/gems/pry http://pryrepl.org/
group :development, :test do gem 'byebug', platform: :mri gem 'pry', '~> 0.10.4' gem 'rspec-rails', '~> 3.5', '>= 3.5.1' gem 'simplecov', '~> 0.12.0', :require => false end
bundle install
$ rails generate rspec:install
rails generate rspec:install
This will create a spec directory and a .rspec file
create .rspec create spec create spec/spec_helper.rb create spec/rails_helper.rb
**spec/spec_helper.rb**
require 'simplecov' SimpleCov.start 'rails'
coverage
$ rspec spec
rspec spec
coverage/index.html
file:///home/jendiamond/Desktop/groundwork/railsgirls-signup/coverage/index.html#_AllFiles
Pull request https://github.com/jendiamond/railsgirls-signup/pull/7
SimpleCov
https://rubygems.org/gems/simplecov/versions/0.12.0 https://github.com/colszowka/simplecov
RSpec-Rails
https://github.com/rspec/rspec-rails https://rubygems.org/gems/rspec-rails/versions/3.5.1
Pry
https://rubygems.org/gems/pry http://pryrepl.org/
Add this to the Gemfile
Run $
bundle install
RSpec-Rails
$
rails generate rspec:install
This will create a spec directory and a .rspec file
SimpleCov
Load and launch SimpleCov at the very top of your
**spec/spec_helper.rb**
Add the following to your .gitignore file to ensure that coverage results are not tracked by Git (optional):
coverage
Run your tests
$
rspec spec
Open up the file
coverage/index.html
in your browser and check out what tests are covered and what you've missed so far.file:///home/jendiamond/Desktop/groundwork/railsgirls-signup/coverage/index.html#_AllFiles