diff --git a/spec/integration/mutant/zombie_spec.rb b/spec/integration/mutant/zombie_spec.rb index 5b8ba382..859dcf10 100644 --- a/spec/integration/mutant/zombie_spec.rb +++ b/spec/integration/mutant/zombie_spec.rb @@ -3,6 +3,6 @@ require 'spec_helper' describe Mutant, 'as a zombie' do specify 'allows to create zombie from mutant' do Zombie.setup - Zombie::Loader # constant created from zombie creation + Zombie::Runner end end diff --git a/spec/support/zombie.rb b/spec/support/zombie.rb index d7134ba4..fd5a923e 100644 --- a/spec/support/zombie.rb +++ b/spec/support/zombie.rb @@ -1,18 +1,11 @@ module Zombie - class Loader - module MethodObject - end - end - - class Matcher - end - def self.setup return if defined?(@done) files.each do |path| path = "#{File.expand_path(path, root)}.rb" ast = File.read(path).to_ast zombify(ast, path) + ToSource.to_source(ast.body) end @done = true end @@ -59,7 +52,7 @@ module Zombie # For some reason loading is not the same as eval...? # eval(root.to_source) - Mutant::Loader.run(script) + ::Mutant::Loader.run(script) end private_class_method :zombify