Skip to content

Commit

Permalink
Calculate mailbox and channel test files as Test LOC stats
Browse files Browse the repository at this point in the history
If they are not included in this "test types" list, they're counted
towards app code lines, not test lines.
  • Loading branch information
carlosantoniodasilva committed Feb 19, 2020
1 parent 0e8a01a commit eef309e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions railties/lib/rails/code_statistics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class CodeStatistics #:nodoc:
"Helper tests",
"Model tests",
"Mailer tests",
"Mailbox tests",
"Channel tests",
"Job tests",
"Integration tests",
"System tests"]
Expand Down
2 changes: 1 addition & 1 deletion railties/test/application/rake_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_should_not_eager_load_model_for_rake
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

Expand Down

0 comments on commit eef309e

Please sign in to comment.