Skip to content

Instantly share code, notes, and snippets.

@sbleon
Created April 11, 2012 17:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbleon/2360892 to your computer and use it in GitHub Desktop.
Save sbleon/2360892 to your computer and use it in GitHub Desktop.
Add Turnip acceptance test LOC stats to "rake stats"
# lib/tasks/acceptance_stats.rake
#
# Add acceptance tests to "rake stats" output
if Rake::Task.task_defined? 'spec:statsetup'
Rake::Task['spec:statsetup'].enhance do
require 'rails/code_statistics'
::STATS_DIRECTORIES << %w(Acceptance\ tests spec/acceptance) if File.exist?('spec/acceptance')
::CodeStatistics::TEST_TYPES << 'Acceptance tests' if File.exist?('spec/acceptance')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment