diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-21 18:53:57 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-21 19:28:12 +0900 |
commit | 38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1 (patch) | |
tree | 8fad28ac8a5d0deecd88a2e3e33ab0212dfb6bbf /spec/bundler/commands/init_spec.rb | |
parent | a47e1328e662b5c095b560b842687ed1901fd7b1 (diff) |
Merge rubygems/bundler master
Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7345
Diffstat (limited to 'spec/bundler/commands/init_spec.rb')
-rw-r--r-- | spec/bundler/commands/init_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/bundler/commands/init_spec.rb b/spec/bundler/commands/init_spec.rb index 9c499b99a1..6aa3e9edd1 100644 --- a/spec/bundler/commands/init_spec.rb +++ b/spec/bundler/commands/init_spec.rb @@ -191,4 +191,17 @@ RSpec.describe "bundle init" do end end end + + describe "using the --gemfile" do + it "should use the --gemfile value to name the gemfile" do + custom_gemfile_name = "NiceGemfileName" + + bundle :init, :gemfile => custom_gemfile_name + + expect(out).to include("Writing new #{custom_gemfile_name}") + used_template = File.read("#{source_root}/lib/bundler/templates/Gemfile") + generated_gemfile = bundled_app(custom_gemfile_name).read + expect(generated_gemfile).to eq(used_template) + end + end end |