Sha256: 901a61823ddae13d1273161bf0467e2dc85f5952d2d5b0eb90da5f16d871bbfd
Contents?: true
Size: 1.1 KB
Versions: 7
Compression:
Stored size: 1.1 KB
Contents
if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == 'ruby' && RUBY_VERSION == '2.3.1' require "simplecov" SimpleCov.start do add_filter '/spec/' end end begin require 'byebug' rescue LoadError; end require 'dry-validation' require 'dry/core/constants' require 'ostruct' SPEC_ROOT = Pathname(__dir__) Dir[SPEC_ROOT.join('shared/**/*.rb')].each(&method(:require)) Dir[SPEC_ROOT.join('support/**/*.rb')].each(&method(:require)) include Dry::Validation module Types include Dry::Types.module end Dry::Validation::Deprecations.configure do |config| config.logger = Logger.new(SPEC_ROOT.join('../log/deprecations.log')) end RSpec.configure do |config| config.disable_monkey_patching! config.after do if defined?(I18n) I18n.load_path = Dry::Validation.messages_paths.dup I18n.backend.reload! end end config.include PredicatesIntegration config.before do module Test def self.remove_constants constants.each { |const| remove_const(const) } self end end end config.after do Object.send(:remove_const, Test.remove_constants.name) end end
Version data entries
7 entries across 7 versions & 1 rubygems