Sha256: bdf80d9a1d1fc793e1a17ed165059f049eb45d84c4bfb4bf648d6c099049bcce

Contents?: true

Size: 1007 Bytes

Versions: 9

Compression:

Stored size: 1007 Bytes

Contents

# encoding: utf-8

if ENV['COVERAGE'] == 'true'
  require 'simplecov'
  require 'coveralls'

  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
    SimpleCov::Formatter::HTMLFormatter,
    Coveralls::SimpleCov::Formatter
 ]

  SimpleCov.start do
    command_name 'spec:unit'

    add_filter 'config'
    add_filter 'spec'
    add_filter 'vendor'
    add_filter 'test_app'

    minimum_coverage 89.77  # TODO: raise this to 100, then mutation test
  end
end

require 'equalizer'
require 'devtools/spec_helper'
require 'mutant'

$LOAD_PATH << 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)
  config.expect_with :rspec do |rspec|
    rspec.syntax = :expect
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mutant-0.5.10 spec/spec_helper.rb
mutant-0.5.9 spec/spec_helper.rb
mutant-0.5.8 spec/spec_helper.rb
mutant-0.5.7 spec/spec_helper.rb
mutant-0.5.6 spec/spec_helper.rb
mutant-0.5.5 spec/spec_helper.rb
mutant-0.5.4 spec/spec_helper.rb
mutant-0.5.3 spec/spec_helper.rb
mutant-0.5.2 spec/spec_helper.rb