aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-15 18:19:51 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-15 18:19:51 +0000
commit2aac6d90fe41ff5165fc4693baca9d668d79d0d8 (patch)
tree76525bf492cc42bf9a9bfdcb63fcc879ceea7aba
parentbb92382424e64c35b484fa4680c235f14af7b7eb (diff)
downloadrails-2aac6d90fe41ff5165fc4693baca9d668d79d0d8.tar.gz
rails-2aac6d90fe41ff5165fc4693baca9d668d79d0d8.tar.bz2
rails-2aac6d90fe41ff5165fc4693baca9d668d79d0d8.zip
Flipped code-to-test ratio around to be more readable #468 [Scott Baron]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/code_statistics.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index e5de3dc999..d06ab1fd08 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Flipped code-to-test ratio around to be more readable #468 [Scott Baron]
+
* Fixed log file permissions to be 666 instead of 777 (so they're not executable) #471 [Lucas Carlson]
* Fixed that auto reloading would some times not work or would reload the models twice #475 [Tobias Luetke]
diff --git a/railties/lib/code_statistics.rb b/railties/lib/code_statistics.rb
index 825772fcf1..efe8fc2454 100644
--- a/railties/lib/code_statistics.rb
+++ b/railties/lib/code_statistics.rb
@@ -98,7 +98,7 @@ class CodeStatistics
code = calculate_code
tests = calculate_tests
- puts " Code LOC: #{code} Test LOC: #{tests} Code to Test Ratio: #{sprintf("%.1f", code/tests.to_f)}:1"
+ puts " Code LOC: #{code} Test LOC: #{tests} Code to Test Ratio: 1:#{sprintf("%.1f", tests.to_f/code)}"
puts ""
end
end