Skip to content

Commit 17e5525

Browse files
author
Ben Thorner
committed
Add SimpleCov to report code coverage
1 parent b48a87d commit 17e5525

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
/public/government-frontend
1919
/test/wraith/wip*
2020
shots/*
21+
/coverage

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ group :test do
3838
gem "faker"
3939
gem "minitest-reporters"
4040
gem "mocha"
41+
gem "simplecov"
4142
gem "webdrivers"
4243
gem "webmock", require: false
4344
end

Gemfile.lock

+6
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ GEM
9292
crass (1.0.6)
9393
dalli (2.7.10)
9494
debug_inspector (0.0.3)
95+
docile (1.3.2)
9596
domain_name (0.5.20190701)
9697
unf (>= 0.0.5, < 1.0.0)
9798
erubi (1.9.0)
@@ -308,6 +309,10 @@ GEM
308309
rubyzip (>= 1.2.2)
309310
sentry-raven (3.0.4)
310311
faraday (>= 1.0)
312+
simplecov (0.19.0)
313+
docile (~> 1.1)
314+
simplecov-html (~> 0.11)
315+
simplecov-html (0.12.3)
311316
slimmer (15.1.1)
312317
activesupport
313318
json
@@ -394,6 +399,7 @@ DEPENDENCIES
394399
rubocop-govuk
395400
sass-rails
396401
scss_lint-govuk
402+
simplecov
397403
slimmer
398404
uglifier
399405
webdrivers

test/test_helper.rb

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
ENV["GOVUK_APP_DOMAIN"] = "test.gov.uk"
33
ENV["GOVUK_ASSET_ROOT"] = "http://static.test.gov.uk"
44

5+
# Must go at top of file
6+
require "simplecov"
7+
SimpleCov.start
8+
59
require File.expand_path("../config/environment", __dir__)
610
require "rails/test_help"
711
require "capybara/rails"

0 commit comments

Comments
 (0)