Correctly override mutant rake task
This commit is contained in:
parent
af89b648f8
commit
e5224baee0
1 changed files with 14 additions and 15 deletions
29
Rakefile
29
Rakefile
|
@ -1,24 +1,23 @@
|
||||||
require 'devtools'
|
require 'devtools'
|
||||||
Devtools.init_rake_tasks
|
Devtools.init_rake_tasks
|
||||||
|
|
||||||
Rake::TaskManager.class_eval do
|
class Rake::Task
|
||||||
def remove_task(task_name)
|
def overwrite(&block)
|
||||||
@tasks.delete(task_name.to_s)
|
@actions.clear
|
||||||
|
enhance(&block)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Rake.application.load_imports
|
||||||
|
|
||||||
namespace :metrics do
|
Rake::Task['metrics:mutant'].overwrite do
|
||||||
desc 'Run mutant'
|
project = Devtools.project
|
||||||
task :mutant => :coverage do
|
require File.expand_path('../spec/support/zombie.rb', __FILE__)
|
||||||
project = Devtools.project
|
Zombie.setup
|
||||||
require File.expand_path('../spec/support/zombie.rb', __FILE__)
|
status = Zombie::CLI.run(%W(::Mutant --rspec-dm2))
|
||||||
Zombie.setup
|
if status.nonzero?
|
||||||
status = Zombie::CLI.run(%W(::Mutant --rspec-dm2))
|
$stderr.puts 'Zombie task is not successful'
|
||||||
if status.nonzero?
|
$stderr.puts 'Not fatal at this point of development, will be fixed before release of 0.3.0'
|
||||||
$stderr.puts 'Zombie task is not successful'
|
|
||||||
$stderr.puts 'Not fatal at this point of development, will be fixed before release of 0.3.0'
|
|
||||||
end
|
|
||||||
Kernel.exit(0) # FIXME: Prevent devtools mutant task
|
|
||||||
end
|
end
|
||||||
|
Kernel.exit(0) # FIXME: Prevent devtools mutant task
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue