Sha256: 13721239725cb499d81d15b8ce31aa1dd26197a62266614185a32f1e1f572646

Contents?: true

Size: 942 Bytes

Versions: 3

Compression:

Stored size: 942 Bytes

Contents

if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == 'ruby' && RUBY_VERSION == '2.4.0'
  require "simplecov"
  SimpleCov.start do
    add_filter '/spec/'
  end
end

SPEC_ROOT = root = Pathname(__FILE__).dirname

require 'dry/core/deprecations'
Dry::Core::Deprecations.set_logger!(SPEC_ROOT.join('../log/deprecations.log'))

require 'rom'

begin
  require 'byebug'
rescue LoadError
end

Dir[root.join('support/*.rb').to_s].each do |f|
  require f
end
Dir[root.join('shared/*.rb').to_s].each do |f|
  require f
end

# Namespace holding all objects created during specs
module Test
  def self.remove_constants
    constants.each(&method(:remove_const))
  end
end

def T(*args)
  ROM::Processor::Transproc::Functions[*args]
end

RSpec.configure do |config|
  config.include(SchemaHelpers)

  config.after do
    Test.remove_constants
  end

  config.around do |example|
    ConstantLeakFinder.find(example)
  end

  config.disable_monkey_patching!
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rom-3.1.0 spec/spec_helper.rb
rom-3.0.3 spec/spec_helper.rb
rom-3.0.2 spec/spec_helper.rb