Skip to content

Instantly share code, notes, and snippets.

@BlakeWilliams
Created April 25, 2013 08:00
Show Gist options
  • Select an option

  • Save BlakeWilliams/5458208 to your computer and use it in GitHub Desktop.

Select an option

Save BlakeWilliams/5458208 to your computer and use it in GitHub Desktop.
Rake task for minitest-rails stats. Slightly incomplete.
task :stats => "test:statssetup"
namespace :test do
task :statssetup do
require 'rails/code_statistics'
['controllers', 'helpers', 'models'] .each do |type|
dir = "test/#{type}"
::STATS_DIRECTORIES << ["#{type} tests", dir]
::CodeStatistics::TEST_TYPES << "#{type} tests"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment