Skip to content

Commit

Permalink
Merge pull request #1852 from alphagov/report-coverage
Browse files Browse the repository at this point in the history
Add SimpleCov to report code coverage
  • Loading branch information
benthorner authored Sep 29, 2020
2 parents b48a87d + 17e5525 commit 7862e9f
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 @@ -18,3 +18,4 @@
/public/government-frontend
/test/wraith/wip*
shots/*
/coverage
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ group :test do
gem "faker"
gem "minitest-reporters"
gem "mocha"
gem "simplecov"
gem "webdrivers"
gem "webmock", require: false
end
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ GEM
crass (1.0.6)
dalli (2.7.10)
debug_inspector (0.0.3)
docile (1.3.2)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
erubi (1.9.0)
Expand Down Expand Up @@ -308,6 +309,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 @@ -394,6 +399,7 @@ DEPENDENCIES
rubocop-govuk
sass-rails
scss_lint-govuk
simplecov
slimmer
uglifier
webdrivers
Expand Down
4 changes: 4 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
ENV["GOVUK_APP_DOMAIN"] = "test.gov.uk"
ENV["GOVUK_ASSET_ROOT"] = "http://static.test.gov.uk"

# Must go at top of file
require "simplecov"
SimpleCov.start

require File.expand_path("../config/environment", __dir__)
require "rails/test_help"
require "capybara/rails"
Expand Down

0 comments on commit 7862e9f

Please sign in to comment.