diff --git a/.gitignore b/.gitignore index 4c5699c..b75c86a 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /yarn-error.log yarn-debug.log* .yarn-integrity +coverage \ No newline at end of file diff --git a/Gemfile b/Gemfile index f7765a9..c9d3d11 100644 --- a/Gemfile +++ b/Gemfile @@ -45,6 +45,7 @@ group :test do gem 'selenium-webdriver' # Easy installation and use of web drivers to run system tests with browsers gem 'webdrivers' + gem 'simplecov', require: false, group: :test end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/Gemfile.lock b/Gemfile.lock index 4592583..fae6f04 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,6 +92,7 @@ GEM childprocess (3.0.0) concurrent-ruby (1.1.7) crass (1.0.6) + docile (1.4.0) erubi (1.9.0) factory_bot (6.1.0) activesupport (>= 5.0.0) @@ -216,6 +217,12 @@ GEM simple_form (5.1.0) actionpack (>= 5.2) activemodel (>= 5.2) + 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) slim (4.1.0) temple (>= 0.7.6, < 0.9) tilt (>= 2.0.6, < 2.1) @@ -289,6 +296,7 @@ DEPENDENCIES sass-rails (>= 6) selenium-webdriver simple_form + simplecov slim-rails state_machines state_machines-activerecord diff --git a/README.md b/README.md index 7db80e4..7a7ce02 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,5 @@ Things you may want to cover: * Deployment instructions * ... + +Coverage Status diff --git a/bin/rails b/bin/rails index 0739660..92ac14a 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,11 @@ #!/usr/bin/env ruby APP_PATH = File.expand_path('../config/application', __dir__) require_relative '../config/boot' + +if ENV['RAILS_ENV'] == 'test' + require 'simplecov' + SimpleCov.start 'rails' + puts "required simplecov" +end + require 'rails/commands' diff --git a/test/test_helper.rb b/test/test_helper.rb index f904510..4a359eb 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,6 @@ +require 'simplecov' +SimpleCov.start + ENV['RAILS_ENV'] ||= 'test' require_relative '../config/environment' require 'rails/test_help' diff --git a/yarn.lock b/yarn.lock index 1215432..72c0a33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9316,6 +9316,11 @@ webpack@^4.41.2: watchpack "^1.7.4" webpack-sources "^1.4.1" +webpacker-react@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/webpacker-react/-/webpacker-react-0.3.2.tgz#18c417a3fd51978d0ca98b62a47454d800754e09" + integrity sha1-GMQXo/1Rl40MqYtipHRU2AB1Tgk= + websocket-driver@0.6.5: version "0.6.5" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36"