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

Version Path
fwtoolkit-2.6.4 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.6.3 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.6.2 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.6.1 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.6.0 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.5.0 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.4.0 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.3.6 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.3.5 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.3.4 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.3.3 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.3.2 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.3.1 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.3.0 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.2.4 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.2.3 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.2.2 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.2.1 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.2.0 features/support/lib_test/aruba_fwt.rb
fwtoolkit-2.1.10 features/support/lib_test/aruba_fwt.rb