diff options
Diffstat (limited to 'spec/bundler/bundler/installer/gem_installer_spec.rb')
-rw-r--r-- | spec/bundler/bundler/installer/gem_installer_spec.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/bundler/bundler/installer/gem_installer_spec.rb b/spec/bundler/bundler/installer/gem_installer_spec.rb index 7340a3acc0..8f8d1c6d15 100644 --- a/spec/bundler/bundler/installer/gem_installer_spec.rb +++ b/spec/bundler/bundler/installer/gem_installer_spec.rb @@ -10,14 +10,14 @@ RSpec.describe Bundler::GemInstaller do subject { described_class.new(spec, installer) } context "spec_settings is nil" do - it "invokes install method with empty build_args", :rubygems => ">= 2" do + it "invokes install method with empty build_args" do allow(spec_source).to receive(:install).with(spec, :force => false, :ensure_builtin_gems_cached => false, :build_args => []) subject.install_from_spec end end context "spec_settings is build option" do - it "invokes install method with build_args", :rubygems => ">= 2" do + it "invokes install method with build_args" do allow(Bundler.settings).to receive(:[]).with(:bin) allow(Bundler.settings).to receive(:[]).with(:inline) allow(Bundler.settings).to receive(:[]).with(:forget_cli_options) @@ -26,4 +26,15 @@ RSpec.describe Bundler::GemInstaller do subject.install_from_spec end end + + context "spec_settings is build option with spaces" do + it "invokes install method with build_args" do + allow(Bundler.settings).to receive(:[]).with(:bin) + allow(Bundler.settings).to receive(:[]).with(:inline) + allow(Bundler.settings).to receive(:[]).with(:forget_cli_options) + allow(Bundler.settings).to receive(:[]).with("build.dummy").and_return("--with-dummy-config=dummy --with-another-dummy-config") + expect(spec_source).to receive(:install).with(spec, :force => false, :ensure_builtin_gems_cached => false, :build_args => ["--with-dummy-config=dummy", "--with-another-dummy-config"]) + subject.install_from_spec + end + end end |