Sha256: 97d9e47cb992944a0067ac9499ab61f2f0d35280ff3c9d551526c410687acc1f
Contents?: true
Size: 995 Bytes
Versions: 3
Compression:
Stored size: 995 Bytes
Contents
# encoding: utf-8 if RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.3' require 'simplecov' SimpleCov.start end begin require 'byebug' rescue LoadError; end SPEC_ROOT = Pathname(__FILE__).dirname Dir[SPEC_ROOT.join('support/*.rb').to_s].each { |f| require f } Dir[SPEC_ROOT.join('shared/*.rb').to_s].each { |f| require f } require 'dry/system/container' module TestNamespace def remove_constants constants.each do |name| remove_const(name) end end end RSpec.configure do |config| config.disable_monkey_patching! config.before do @load_paths = $LOAD_PATH.dup @loaded_features = $LOADED_FEATURES.dup Object.const_set(:Test, Module.new { |m| m.extend(TestNamespace) }) end config.after do ($LOAD_PATH - @load_paths).each do |path| $LOAD_PATH.delete(path) end ($LOADED_FEATURES - @loaded_features).each do |file| $LOADED_FEATURES.delete(file) end Test.remove_constants Object.send(:remove_const, :Test) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dry-system-0.7.1 | spec/spec_helper.rb |
dry-system-0.7.0 | spec/spec_helper.rb |
dry-system-0.6.0 | spec/spec_helper.rb |