Sha256: 92a71f0368a53ffe0bdca0b30ca6f221b7460dffca2599f9f4a5f3fbe9bd98a9

Contents?: true

Size: 965 Bytes

Versions: 4

Compression:

Stored size: 965 Bytes

Contents

# encoding: utf-8

# this is needed for guard to work, not sure why :(
require "bundler"
Bundler.setup

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

require 'rom-sql'
require 'rom-repository'

begin
  require 'byebug'
rescue LoadError
end

root = Pathname(__FILE__).dirname
LOGGER = Logger.new(File.open('./log/test.log', 'a'))

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

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

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

RSpec.configure do |config|
  config.after do
    Test.remove_constants
  end

  config.include(MapperRegistry)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rom-repository-1.0.0.rc1 spec/spec_helper.rb
rom-repository-1.0.0.beta3 spec/spec_helper.rb
rom-repository-1.0.0.beta2 spec/spec_helper.rb
rom-repository-1.0.0.beta1 spec/spec_helper.rb