Skip to content

Commit

Permalink
Merge pull request #1784 from DFE-Digital/paas/code-coverage
Browse files Browse the repository at this point in the history
Code Coverage Gem Added
  • Loading branch information
sfawcett123 authored Jun 24, 2021
2 parents f766411 + a99991f commit 8cf152c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ package-lock.json
yarn-debug.log*
.yarn-integrity
fetch_config.rb
coverage
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,5 @@ group :test do
gem 'capybara-screenshot'
gem 'flipper-active_support_cache_store'
gem 'webmock'
gem 'simplecov' , require: false
end
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ GEM
rack-protection (>= 1.5.5)
sinatra (>= 1.4.4)
diff-lcs (1.4.4)
docile (1.4.0)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
Expand Down Expand Up @@ -491,6 +492,12 @@ GEM
faraday
shoulda-matchers (4.5.1)
activesupport (>= 4.2.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
sinatra (2.1.0)
mustermann (~> 1.0)
rack (~> 2.2)
Expand Down Expand Up @@ -628,6 +635,7 @@ DEPENDENCIES
sentry-rails
sentry-ruby
shoulda-matchers (~> 4.5)
simplecov
spring
spring-commands-rspec
spring-watcher-listen (~> 2.0.0)
Expand Down
14 changes: 14 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
# it.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

require "simplecov"
require "simplecov_json_formatter"
SimpleCov.start "rails" do
add_filter "/bin/"
add_filter "/db/"
add_filter "/spec/"

formatter SimpleCov::Formatter::MultiFormatter.new [
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::JSONFormatter,
]
end

RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
Expand Down

0 comments on commit 8cf152c

Please sign in to comment.