From a0d8edf8b5cb314b862e05c8791d90b1d915a939 Mon Sep 17 00:00:00 2001 From: Mateusz Grotek Date: Thu, 27 Jun 2024 16:02:11 +0100 Subject: [PATCH 1/2] Check ruby test coverage before merging PRs --- test/test_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 64e0938d1..d6b8686cb 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -4,7 +4,11 @@ # Must go at top of file require "simplecov" -SimpleCov.start + +SimpleCov.start "rails" do + enable_coverage :branch + minimum_coverage 95 +end require "i18n/coverage" require "i18n/coverage/printers/file_printer" From 5b6fbf383e3d5bdd90eda364d1c913ae3d5bcc66 Mon Sep 17 00:00:00 2001 From: Mateusz Grotek Date: Fri, 28 Jun 2024 10:13:18 +0100 Subject: [PATCH 2/2] Add missing test for DevelopmentController --- test/controllers/development_controller_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/controllers/development_controller_test.rb diff --git a/test/controllers/development_controller_test.rb b/test/controllers/development_controller_test.rb new file mode 100644 index 000000000..a669b0eb4 --- /dev/null +++ b/test/controllers/development_controller_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +class DevelopmentControllerTest < ActionController::TestCase + test "shows inde page" do + get :index + assert_response :ok + assert response.body.include?("This page is intended to be shown in development and on Heroku review apps.") + end +end