Sha256: 08268ca04ef35eb5b97edbb77ce305895cda37dd33c0f94ab312617f77b36690

Contents?: true

Size: 933 Bytes

Versions: 2

Compression:

Stored size: 933 Bytes

Contents

# encoding: utf-8

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

if RUBY_ENGINE == "rbx"
  require "codeclimate-test-reporter"
  CodeClimate::TestReporter.start
end

SPEC_ROOT = root = Pathname(__FILE__).dirname

require 'rom/support/deprecations'
ROM::Deprecations.set_logger!(SPEC_ROOT.join('../log/deprecations.log'))

require 'rom'
require 'anima'

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rom-2.0.1 spec/spec_helper.rb
rom-2.0.0 spec/spec_helper.rb