Sha256: 2ca3a512e9840b7fb5074a1c9c1540f247866e8d8fa9a698741447320f6f5730
Contents?: true
Size: 932 Bytes
Versions: 1
Compression:
Stored size: 932 Bytes
Contents
require "bundler/gem_tasks" require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) # task :default => :spec task :+ => [:spec, :mutant] task :default => :+ desc 'mutate-test given class' task :mutate, [:who, :file] do |t,args| # args.with_defaults who: 'Map'; who = args.who who, file = args.who, args.file klass = who # file = who.underscore system "mutant -I lib -r #{ file } --rspec-dm2 ::#{ klass }" end desc 'run all mutation tests' task :mutant do Rake::Task[:mutate].invoke 'MetaModule::MModule', 'meta_module' Rake::Task[:mutate].reenable Rake::Task[:mutate].invoke 'MetaModule::MModule2', 'meta_module' # use file instead of class, get all files in lib/**? end task :m => :mutant BEGIN{ class String def underscore self.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end def +@; inspect end end }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
meta_module-0.0.1 | Rakefile |