2013-12-29 17:36:55 -05:00
|
|
|
require 'devtools'
|
2013-07-29 20:17:04 -04:00
|
|
|
|
2013-12-29 17:36:55 -05:00
|
|
|
Devtools.init_rake_tasks
|
2014-04-22 18:11:02 -04:00
|
|
|
|
2015-07-24 11:01:42 -04:00
|
|
|
Rake.application.load_imports
|
2014-05-07 14:15:39 -04:00
|
|
|
|
2015-07-24 11:01:42 -04:00
|
|
|
task('metrics:mutant').clear
|
|
|
|
namespace :metrics do
|
2015-11-15 18:13:43 -05:00
|
|
|
task mutant: :coverage do
|
|
|
|
arguments = %w[
|
2015-07-24 11:01:42 -04:00
|
|
|
bundle exec mutant
|
2015-11-15 18:13:43 -05:00
|
|
|
--ignore-subject Mutant::Meta*
|
2015-07-24 11:01:42 -04:00
|
|
|
--include lib
|
|
|
|
--since HEAD~1
|
2015-11-15 18:13:43 -05:00
|
|
|
--require mutant
|
|
|
|
--use rspec
|
|
|
|
--zombie
|
|
|
|
]
|
2016-03-20 17:20:01 -04:00
|
|
|
arguments.concat(%w[--jobs 4]) if ENV.key?('CIRCLE_CI')
|
2015-11-15 18:13:43 -05:00
|
|
|
|
|
|
|
arguments.concat(%w[-- Mutant*])
|
|
|
|
|
2016-03-20 17:20:01 -04:00
|
|
|
Kernel.system(*arguments) or fail 'Mutant task is not successful'
|
2014-06-02 11:15:04 -04:00
|
|
|
end
|
|
|
|
end
|