Sha256: a9c947b16c10887c7272df9a84e656c0a4f449270a62133b82b6333a5b426ddd

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

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'

    minimum_coverage 100
  end
end

require 'devtools/spec_helper'
require 'axiom'

include Axiom

RSpec.configure do |config|
  config.expect_with :rspec do |expect_with|
    expect_with.syntax = [:expect, :should]
  end

  # Record the original Attribute descendants
  config.before do
    @original_attribute_descendants = Attribute.descendants.dup
  end

  # Reset the Attribute descendants
  config.after do
    Attribute.descendants.replace(@original_attribute_descendants)
  end

  # Record the original Type descendants
  config.before do
    Axiom::Types.finalize
    @original_type_descendants = Axiom::Types::Type.descendants.dup
  end

  # Reset the Type descendants
  config.after do
    Axiom::Types::Type.descendants.replace(@original_type_descendants)
    Axiom::Types.instance_variable_get(:@inference_cache).clear
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.1 spec/spec_helper.rb