diff options
author | Simon Fish <si@mon.fish> | 2021-10-26 17:50:55 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-12-08 01:49:20 +0900 |
commit | 1b12ebb94e50e16ca9f226e583ee2a3d418402d6 (patch) | |
tree | 5965b5c76cb8ff508f4519f37e76fccde884f58a /spec/bundler/commands/add_spec.rb | |
parent | 26303c31f0939d093f88f609c846590ad538114f (diff) |
[rubygems/rubygems] Add require parameter to `bundle add``
Test and ensure "false" is handled
Don't use yield_self to operate on autorequire
Remove duplicate autorequire
Add banner to require option
Don't use json to break down require params
Pass linter
https://github.com/rubygems/rubygems/commit/a4f2f8ac17
Diffstat (limited to 'spec/bundler/commands/add_spec.rb')
-rw-r--r-- | spec/bundler/commands/add_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/bundler/commands/add_spec.rb b/spec/bundler/commands/add_spec.rb index 4c533652ca..093ec53fea 100644 --- a/spec/bundler/commands/add_spec.rb +++ b/spec/bundler/commands/add_spec.rb @@ -68,6 +68,18 @@ RSpec.describe "bundle add" do end end + describe "with --require" do + it "adds the require param for the gem" do + bundle "add 'foo' --require=foo/engine" + expect(bundled_app_gemfile.read).to match(%r{gem "foo",(?: .*,) :require => "foo\/engine"}) + end + + it "converts false to a boolean" do + bundle "add 'foo' --require=false" + expect(bundled_app_gemfile.read).to match(/gem "foo",(?: .*,) :require => false/) + end + end + describe "with --group" do it "adds dependency for the specified group" do bundle "add 'foo' --group='development'" |