From d348928c216d4591466ee35f3bd848897bb227c4 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 25 Feb 2008 13:19:29 -0800 Subject: [PATCH] Fixed 'rake todo', broken after last mspec change --- rakelib/todo.rake | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/rakelib/todo.rake b/rakelib/todo.rake index 5f474cc177..3ab469da5b 100644 --- a/rakelib/todo.rake +++ b/rakelib/todo.rake @@ -2,19 +2,17 @@ task :todo do excludes = Hash.new 0 - Dir.chdir "spec/data" do - Find.find "." do |path| - next unless File.file? path - next unless File.size? path - dir = File.dirname(path).sub(/^\../, '') - - excludes[dir] += File.readlines(path).size - end + Find.find "spec/tags" do |path| + next unless File.file? path + next unless File.size? path + dir = File.dirname(path).sub(/^\../, '') + + excludes[dir] += File.readlines(path).size end total = 0 excludes.sort_by { |_, v| -v }.each do |dir, count| - puts "%3d: spec/%s" % [count, dir] + puts "%3d: %s" % [count, dir] total += count end puts "%3d: TOTAL" % total