diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-28 13:47:51 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-01 17:23:17 +0200 |
commit | bd5e0cf17c8119397cbd1cf9745c62c3352e9caf (patch) | |
tree | 2a807853f5ccf5dfb526cecc88848d6ba311fec5 | |
parent | 1a3b36ea5b73ec1a35c533d5913859524875b08e (diff) | |
download | bundler-bd5e0cf17c8119397cbd1cf9745c62c3352e9caf.tar.gz |
Clarify lockfile and gemfile helpers
-rw-r--r-- | spec/support/helpers.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 151c99c3ff..72a94ea326 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -268,18 +268,22 @@ module Spec end def gemfile(*args) - if args.empty? + contents = args.shift + + if contents.nil? File.open("Gemfile", "r", &:read) else - create_file("Gemfile", *args) + create_file("Gemfile", contents, *args) end end def lockfile(*args) - if args.empty? + contents = args.shift + + if contents.nil? File.open("Gemfile.lock", "r", &:read) else - create_file("Gemfile.lock", *args) + create_file("Gemfile.lock", contents, *args) end end |