How to add SimpleCov
I tried adding https://github.com/colszowka/simplecov to my app using the Jumpstart template, and I'm unable to generate any coverage reports. I placed
require 'simplecov' SimpleCov.start
at the very top of my `test/test_helper.rb` file like their README suggests, but when I run the tests, it doesn't generate the coverage folder.
Has anyone had success in adding SimpleCov to this project template?
Hi
Jake Smith
!
I've already added SimpleCov to my project without hassle. I also tested adding it on a clean cloned repository successfully 👍
ENV details:
I've already added SimpleCov to my project without hassle. I also tested adding it on a clean cloned repository successfully 👍
ENV details:
- ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
- Rails 6.0.3.2
- simplecov (0.18.5)
Assuming you followed the instructions at https://github.com/colszowka/simplecov#getting-started, where did you place it in the Gemfile? Note that the Jumpstart default Gemfile already has a :test group, I placed mine at the end of it (
gem 'simplecov', require: false
). However, I also tested placing inside all bundler groups...no change.It might be your
.gitignore
file tricking you. Did you add it there already?For fun, I made a RailsByte to install SimpleCov: https://railsbytes.com/public/templates/zPdsaZ
Hey guys, thanks for the response! I tried adding SimpleCov again from scratch, and I'm still not able to get a coverage folder created. My tests run fine, but after they finish, it is not creating that folder.
I added SimpleCov to the Gemfile like this:
Then I added this to `test_helper.rb`:
I think I'm following the same approach you both did. This leads me to believe I've done something outside of SimpleCov to get in its way.
I added SimpleCov to the Gemfile like this:
Then I added this to `test_helper.rb`:
I think I'm following the same approach you both did. This leads me to believe I've done something outside of SimpleCov to get in its way.
Notifications
You’re not receiving notifications from this thread.