2013-06-04 16:16:04 -04:00
|
|
|
require 'mutant'
|
2013-02-24 13:54:41 -05:00
|
|
|
require 'devtools'
|
|
|
|
Devtools.init_spec_helper
|
2012-07-23 10:37:44 -04:00
|
|
|
|
2012-08-14 06:27:56 -04:00
|
|
|
$: << File.join(TestApp.root,'lib')
|
|
|
|
|
2012-08-14 16:45:34 -04:00
|
|
|
require 'test_app'
|
2012-07-26 13:25:23 -04:00
|
|
|
|
2013-06-27 16:18:07 -04:00
|
|
|
module Fixtures
|
|
|
|
AST_CACHE = Mutant::Cache.new
|
|
|
|
end
|
|
|
|
|
2013-06-04 13:22:33 -04:00
|
|
|
module ParserHelper
|
|
|
|
def generate(node)
|
|
|
|
Unparser.unparse(node)
|
|
|
|
end
|
|
|
|
|
|
|
|
def parse(string)
|
|
|
|
Parser::CurrentRuby.parse(string)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-07-30 18:48:04 -04:00
|
|
|
RSpec.configure do |config|
|
2012-08-16 12:02:03 -04:00
|
|
|
config.include(CompressHelper)
|
2013-06-04 13:22:33 -04:00
|
|
|
config.include(ParserHelper)
|
2013-06-04 16:16:04 -04:00
|
|
|
config.include(Mutant::NodeHelpers)
|
2013-07-14 19:17:15 -04:00
|
|
|
config.mock_with :rspec do |config|
|
|
|
|
config.syntax = [:expect, :should]
|
|
|
|
end
|
2012-07-23 10:37:44 -04:00
|
|
|
end
|