module CLI::Kit::Support::TestHelper::FakeConfig

Public Instance Methods

setup() click to toggle source
Calls superclass method
# File lib/cli/kit/support/test_helper.rb, line 26
def setup
  super
  @tmpdir = Dir.mktmpdir
  @prev_xdg = ENV['XDG_CONFIG_HOME']
  ENV['XDG_CONFIG_HOME'] = @tmpdir
end
teardown() click to toggle source
Calls superclass method
# File lib/cli/kit/support/test_helper.rb, line 33
def teardown
  FileUtils.rm_rf(@tmpdir)
  ENV['XDG_CONFIG_HOME'] = @prev_xdg
  super
end