Sha256: df703006a77919edcd9ebbebdbd94326866eef6de65e34c6e738c4153c289ae5
Contents?: true
Size: 642 Bytes
Versions: 42
Compression:
Stored size: 642 Bytes
Contents
require 'fake_gem' module Aruba module Api def create_fake_home(dir_name) @@__arubafw_original_home = ENV["HOME"] home_dir = File.expand_path File.join("tmp", "aruba", dir_name) ENV["HOME"] = home_dir FileUtils.mkdir_p home_dir end def restore_original_home unless (defined?(@@__arubafw_original_home).nil? || @@__arubafw_original_home.nil?) ENV['HOME'] = @@__arubafw_original_home @@__arubafw_original_home = nil end end def install_fake_gem(gem_name) FakeGem.new(gem_name).install end end end World(Aruba::Api) After do restore_original_home end
Version data entries
42 entries across 42 versions & 1 rubygems