From 6f98614b1fd41e9d3313d11827f9697996b3c515 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 19 Feb 2020 09:20:41 -0300 Subject: [PATCH] Calculate mailbox and channel test files as Test LOC stats If they are not included in this "test types" list, they're counted towards app code lines, not test lines. --- railties/lib/rails/code_statistics.rb | 2 ++ railties/test/application/rake_test.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb index 9556b659ee..4ac85b431f 100644 --- a/railties/lib/rails/code_statistics.rb +++ b/railties/lib/rails/code_statistics.rb @@ -8,6 +8,8 @@ class CodeStatistics #:nodoc: "Helper tests", "Model tests", "Mailer tests", + "Mailbox tests", + "Channel tests", "Job tests", "Integration tests", "System tests"] diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index c7255f5d4c..033869c83e 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -141,7 +141,7 @@ module ApplicationTests end def test_code_statistics_sanity - assert_match "Code LOC: 32 Test LOC: 0 Code to Test Ratio: 1:0.0", + assert_match "Code LOC: 29 Test LOC: 3 Code to Test Ratio: 1:0.1", rails("stats") end