diff options
author | Bundlerbot <bot@bundler.io> | 2018-10-19 08:01:04 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2018-10-19 08:01:04 +0000 |
commit | 74f142be8c322e035ae52894d4ea4166ffb93fbf (patch) | |
tree | 17cea446684563478eb9f67e672276ea1725f05a /spec/plugins | |
parent | 39e32b53d2bbc9b77b2cc200d36323d4480ef308 (diff) | |
parent | f8049f512762ad5bb658e1137b6ce2b86a6f8e9a (diff) | |
download | bundler-74f142be8c322e035ae52894d4ea4166ffb93fbf.tar.gz |
Merge #6749
6749: Add local git repository source option (`--local_git`) to plugin installation r=indirect a=indirect
Reopening #6338 to close #5446.
Co-authored-by: Saverio Miroddi <saverio.pub2@gmail.com>
Diffstat (limited to 'spec/plugins')
-rw-r--r-- | spec/plugins/install_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/plugins/install_spec.rb b/spec/plugins/install_spec.rb index 9304d78062..3f8a5940fe 100644 --- a/spec/plugins/install_spec.rb +++ b/spec/plugins/install_spec.rb @@ -122,6 +122,24 @@ RSpec.describe "bundler plugin install" do expect(out).to include("Installed plugin foo") plugin_should_be_installed("foo") end + + it "installs form a local git source" do + build_git "foo" do |s| + s.write "plugins.rb" + end + + bundle "plugin install foo --local_git #{lib_path("foo-1.0")}" + + expect(out).to include("Installed plugin foo") + plugin_should_be_installed("foo") + end + + it "raises an error when both git and local git sources are specified" do + bundle "plugin install foo --local_git /phony/path/project --git git@gitphony.com:/repo/project" + + expect(exitstatus).not_to eq(0) if exitstatus + expect(out).to eq("Remote and local plugin git sources can't be both specified") + end end context "Gemfile eval" do |