Sha256: aec0c9fc987d31ce1719661fcba081ffb7dff30fbdddcc2303492c4e78ed17b4

Contents?: true

Size: 868 Bytes

Versions: 4

Compression:

Stored size: 868 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

require 'rom'
require 'anima'

begin
  require 'byebug'
rescue LoadError
end

SPEC_ROOT = 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.before do
    ROM.env = nil
  end

  config.after do
    Test.remove_constants
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

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