Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RSpec & SimpleCov & Pry #6

Closed
jendiamond opened this issue Jul 31, 2016 · 0 comments
Closed

Add RSpec & SimpleCov & Pry #6

jendiamond opened this issue Jul 31, 2016 · 0 comments

Comments

@jendiamond
Copy link
Owner

jendiamond commented Jul 31, 2016

Pull request #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

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

Run $ bundle install

RSpec-Rails

$ 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

SimpleCov

Load and launch SimpleCov at the very top of your **spec/spec_helper.rb**

require 'simplecov'
SimpleCov.start 'rails'

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

@jendiamond jendiamond changed the title Add RSpec & SimpleCov Add RSpec & SimpleCov & Pry Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant