summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2018-09-25 15:36:56 -0300
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-05 09:25:44 +0200
commit22de94d3b419cc6413758bd3decbf96381dbef9e (patch)
tree40521c70064e42db6f5f6232676ff5bc854264d4
parentca5e0bd3cfcaf0bb1e3f775a308a9927bde1c468 (diff)
downloadbundler-22de94d3b419cc6413758bd3decbf96381dbef9e.tar.gz
Reuse `gemfile` spec helper
-rw-r--r--spec/commands/config_spec.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
index a087eeb206..c0ef3bb70c 100644
--- a/spec/commands/config_spec.rb
+++ b/spec/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)