Sha256: d65782b9aa5d787e68faee1533a789cce2c7d96bf1160a798dd429889641a1ca
Contents?: true
Size: 918 Bytes
Versions: 1
Compression:
Stored size: 918 Bytes
Contents
# encoding: utf-8 if RUBY_ENGINE == 'rbx' require 'codeclimate-test-reporter' CodeClimate::TestReporter.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/component/container' class Dry::Component::Container setting :env, 'test' end 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 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 Test.remove_constants Object.send(:remove_const, :Test) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dry-component-0.0.1 | spec/spec_helper.rb |