Sha256: 39d6021b2e37f23417c53fc5eace4907de49213799d8804e811ac1aa81049edb
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
if RUBY_ENGINE == 'ruby' && ENV['COVERAGE'] == 'true' require 'yaml' rubies = YAML.load(File.read(File.join(__dir__, '..', '.travis.yml')))['rvm'] latest_mri = rubies.select { |v| v =~ /\A\d+\.\d+.\d+\z/ }.max if RUBY_VERSION == latest_mri require 'simplecov' SimpleCov.start do add_filter '/spec/' end 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rom-mapper-0.5.1 | spec/spec_helper.rb |