Sha256: 9b37326863bfb49882fa0af562af2ed3a58b0ed1337d3831314fd2e16cebb7af

Contents?: true

Size: 870 Bytes

Versions: 3

Compression:

Stored size: 870 Bytes

Contents

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

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

require 'rom-mapper'

begin
  require 'byebug'
rescue LoadError
end

root = Pathname(__FILE__).dirname

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.after do
    Test.remove_constants
  end

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

  config.disable_monkey_patching!

  config.warnings = true
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rom-mapper-0.5.0 spec/spec_helper.rb
rom-mapper-0.5.0.rc1 spec/spec_helper.rb
rom-mapper-0.5.0.beta1 spec/spec_helper.rb