diff options
Diffstat (limited to 'spec/bundler')
-rw-r--r-- | spec/bundler/commands/console_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/bundler/commands/console_spec.rb b/spec/bundler/commands/console_spec.rb index aa76096e3d..1a38ce29d5 100644 --- a/spec/bundler/commands/console_spec.rb +++ b/spec/bundler/commands/console_spec.rb @@ -45,6 +45,17 @@ RSpec.describe "bundle console", :bundler => "< 3", :readline => true do G end + around :each do |example| + require 'tmpdir' + Dir.mktmpdir("bundler_commands_console") do |dir| + xdg_config_home_backup = ENV.delete("XDG_CONFIG_HOME") + ENV["XDG_CONFIG_HOME"] = dir + example.run + ensure + ENV["XDG_CONFIG_HOME"] = xdg_config_home_backup + end + end + it "starts IRB with the default group loaded" do bundle "console" do |input, _, _| input.puts("puts RACK") |