diff options
Diffstat (limited to 'spec/commands/install_spec.rb')
-rw-r--r-- | spec/commands/install_spec.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb index 8acf2202bb..9a4ce33a26 100644 --- a/spec/commands/install_spec.rb +++ b/spec/commands/install_spec.rb @@ -504,23 +504,20 @@ RSpec.describe "bundle install with gem sources" do end describe "when Bundler root contains regex chars" do - before do + it "doesn't blow up" do root_dir = tmp("foo[]bar") FileUtils.mkdir_p(root_dir) - Dir.chdir(root_dir) - end - it "doesn't blow up" do build_lib "foo" gemfile = <<-G gem 'foo', :path => "#{lib_path("foo-1.0")}" G - File.open("Gemfile", "w") do |file| + File.open("#{root_dir}/Gemfile", "w") do |file| file.puts gemfile end - bundle :install + bundle :install, :dir => root_dir expect(exitstatus).to eq(0) if exitstatus end |