Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #841 from alphagov/monitor-coverage
Browse files Browse the repository at this point in the history
Use SimpleCov to report coverage after tests
  • Loading branch information
benthorner authored Sep 29, 2020
2 parents 8a9fbc5 + e70bafd commit e7a3cc8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
/tmp

.DS_Store
/coverage
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ group :development, :test do
gem "govuk_test"
gem "pry-rails"
gem "rspec-rails"
gem "simplecov"
gem "webmock"
end
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ GEM
crass (1.0.6)
database_cleaner (1.8.5)
diff-lcs (1.4.4)
docile (1.3.2)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
elasticsearch (6.8.2)
Expand Down Expand Up @@ -305,6 +306,10 @@ GEM
rubyzip (>= 1.2.2)
sentry-raven (3.0.4)
faraday (>= 1.0)
simplecov (0.19.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.3)
slimmer (15.1.1)
activesupport
json
Expand Down Expand Up @@ -372,6 +377,7 @@ DEPENDENCIES
rspec-rails
rubocop-govuk
sass-rails
simplecov
slimmer
uglifier
webmock
Expand Down
4 changes: 4 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= "test"

require "simplecov"
SimpleCov.start "rails"

require File.expand_path("../config/environment", __dir__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
Expand Down

0 comments on commit e7a3cc8

Please sign in to comment.