From aae244569b426367426b83ef3272810282f48ee5 Mon Sep 17 00:00:00 2001 From: David Rodríguez Date: Tue, 25 Sep 2018 15:36:56 -0300 Subject: [bundler/bundler] Reuse `gemfile` spec helper https://github.com/bundler/bundler/commit/22de94d3b4 --- spec/bundler/commands/config_spec.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'spec') diff --git a/spec/bundler/commands/config_spec.rb b/spec/bundler/commands/config_spec.rb index a087eeb206..c0ef3bb70c 100644 --- a/spec/bundler/commands/config_spec.rb +++ b/spec/bundler/commands/config_spec.rb @@ -478,12 +478,10 @@ end RSpec.describe "setting gemfile via config" do context "when only the non-default Gemfile exists" do it "persists the gemfile location to .bundle/config" do - File.open(bundled_app("NotGemfile"), "w") do |f| - f.write <<-G - source "#{file_uri_for(gem_repo1)}" - gem 'rack' - G - end + gemfile bundled_app("NotGemfile"), <<-G + source "#{file_uri_for(gem_repo1)}" + gem 'rack' + G bundle "config set --local gemfile #{bundled_app("NotGemfile")}" expect(File.exist?(".bundle/config")).to eq(true) -- cgit v1.2.3