Skip to content

Instantly share code, notes, and snippets.

@mbj
Created June 6, 2013 15:07
Show Gist options
  • Save mbj/5722231 to your computer and use it in GitHub Desktop.
Save mbj/5722231 to your computer and use it in GitHub Desktop.
How to patch metrics:mutant
class Rake::Task
def overwrite(&block)
@actions.clear
enhance(&block)
end
end
Rake.application.load_imports
Rake::Task['metrics:mutant'].overwrite do
begin
require 'mutant'
rescue LoadError
end
if defined?(Mutant)
status = Mutant::CLI.run(%W(--rspec-dm2 -r ./spec/spec_helper.rb ::Foo::Bar ::Foo::Baz))
unless status.zero?
fail "Not mutation covered :("
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment