free_mutant/spec/spec_helper.rb

52 lines
1.1 KiB
Ruby
Raw Normal View History

2013-07-28 18:44:26 -04:00
if ENV['COVERAGE'] == 'true'
require 'simplecov'
SimpleCov.start do
command_name 'spec:unit'
add_filter 'config'
add_filter 'spec'
add_filter 'vendor'
add_filter 'test_app'
2014-06-05 13:45:49 -04:00
add_filter 'lib/mutant/meta/*'
add_filter 'lib/mutant/zombifier'
add_filter 'lib/mutant/zombifier/*'
2014-10-08 09:26:52 -04:00
minimum_coverage 97.64 # TODO: raise this to 100, then mutation test
2013-07-28 18:44:26 -04:00
end
end
require 'concord'
require 'adamantium'
require 'devtools/spec_helper'
require 'unparser/cli'
2013-06-04 16:16:04 -04:00
require 'mutant'
require 'mutant/meta'
2014-08-10 11:06:09 -04:00
Devtools.init_spec_helper
$LOAD_PATH << File.join(TestApp.root, 'lib')
2012-08-14 16:45:34 -04:00
require 'test_app'
module Fixtures
TEST_CONFIG = Mutant::Config::DEFAULT.update(reporter: Mutant::Reporter::Trace.new)
TEST_CACHE = Mutant::Cache.new
TEST_ENV = Mutant::Env.new(TEST_CONFIG, TEST_CACHE)
end # Fixtures
module ParserHelper
def generate(node)
Unparser.unparse(node)
end
def parse(string)
Unparser::Preprocessor.run(Parser::CurrentRuby.parse(string))
end
end
RSpec.configure do |config|
2012-08-16 12:02:03 -04:00
config.include(CompressHelper)
config.include(ParserHelper)
config.include(Mutant::AST::Sexp)
end