free_mutant/spec/spec_helper.rb
Markus Schirp 49133680ee Add AST caching for subject matcher
At least this dramatically speeds up unit tests. And this is a good
thing.
2013-06-27 22:18:07 +02:00

27 lines
451 B
Ruby

require 'mutant'
require 'devtools'
Devtools.init_spec_helper
$: << File.join(TestApp.root,'lib')
require 'test_app'
module Fixtures
AST_CACHE = Mutant::Cache.new
end
module ParserHelper
def generate(node)
Unparser.unparse(node)
end
def parse(string)
Parser::CurrentRuby.parse(string)
end
end
RSpec.configure do |config|
config.include(CompressHelper)
config.include(ParserHelper)
config.include(Mutant::NodeHelpers)
end