Finalize method matching

* Add tests for all edge cases I could create
* Add infrastructure for loading mutations into the vm.
* The fun part is next!
This commit is contained in:
Markus Schirp 2012-07-26 19:25:23 +02:00
parent dc893bfd7d
commit 10c3dfc390
34 changed files with 1070 additions and 108 deletions

View file

@ -34,6 +34,7 @@ begin
raise "ruby2ruby version #{Ruby2Ruby::VERSION} may not work properly, 1.2.2 *only* is recommended for use with heckle"
end
require File.expand_path('../../../spec/support/fake_ast',__FILE__)
require 'mutant'
root_module_regexp = Regexp.union('Mutant')
@ -54,6 +55,13 @@ begin
ObjectSpace.each_object(Module) do |mod|
next unless mod.name =~ /\A#{root_module_regexp}(?::|\z)/
# Mutation::Loader is to rbx specific
next if mod == Mutant::Loader
# Mutation::Matcher::Method is to rbx specific
next if mod == Mutant::Matcher::Method
# Mutation::Context::Constant is to rbx specific
next if mod == Mutant::Context::Constant
spec_prefix = spec_dir.join(mod.name.underscore)
specs = []