Created
June 6, 2013 15:07
-
-
Save mbj/5722231 to your computer and use it in GitHub Desktop.
How to patch metrics:mutant
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
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