Sha256: 1ee6a0a615387541abf768110ce4395f03fcdfad9de39bb2790f376f978a2e49
Contents?: true
Size: 514 Bytes
Versions: 6
Compression:
Stored size: 514 Bytes
Contents
require 'tmpdir' require 'webmock/rspec' GEM_ROOT = Gem::Specification.find_by_name('clicoder').gem_dir FIXTURE_DIR = GEM_ROOT + '/fixtures' WebMock.disable_net_connect!(allow_localhost: true) RSpec.configure do |config| config.around(:each) do |example| # Make tmpdir HOME and copy config and template files Dir.mktmpdir do |dir| Dir.chdir(dir) do FileUtils.cp_r("#{FIXTURE_DIR}/clicoder.d", '.clicoder.d') ENV['HOME'] = Dir.pwd example.run end end end end
Version data entries
6 entries across 6 versions & 1 rubygems