Created
December 9, 2011 16:37
-
-
Save hauleth/1452272 to your computer and use it in GitHub Desktop.
Rakeflie tasks for code quality testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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