Skip to content

Instantly share code, notes, and snippets.

@hauleth
Created December 9, 2011 16:37
Show Gist options
  • Save hauleth/1452272 to your computer and use it in GitHub Desktop.
Save hauleth/1452272 to your computer and use it in GitHub Desktop.
Rakeflie tasks for code quality testing
require 'flog_task'
require 'flay_task'
desc "Runs all code quality metrics"
task :quality => [:'quality:flog', :'quality:flay']
namespace :quality do
FlogTask.new :flog, 200, %w[app lib]
FlayTask.new :flay, 200, %w[app lib]
end
desc "Runs all tests with code coverage"
task :coverage => [:'coverage:rspec', :'coverage:cucumber']
namespace :coverage do
desc "Run RSpec with code coverage"
task :rspec do
ENV['COVERAGE'] = 'true'
Rake::Task["spec"].execute
end
desc "Run Cucumber with code coverage"
task :cucumber do
ENV['COVERAGE'] = 'true'
Rake::Task["cucumber"].execute
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment