summaryrefslogtreecommitdiff
path: root/spec/plugins
diff options
context:
space:
mode:
authorAnkit Kataria <ankitkataria28@gmail.com>2019-02-21 02:59:59 +0530
committerAnkit Kataria <ankitkataria28@gmail.com>2019-02-21 02:59:59 +0530
commita0b91e3ad4e9243bdf73ca4eab6e755d93318899 (patch)
tree07418e404afe40be247108d103ee53087a7f06f8 /spec/plugins
parent5dc368b07c407702a485ed53d8fd8a8ab40fa9ef (diff)
downloadbundler-a0b91e3ad4e9243bdf73ca4eab6e755d93318899.tar.gz
add check for already installed plugin
Diffstat (limited to 'spec/plugins')
-rw-r--r--spec/plugins/install_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/plugins/install_spec.rb b/spec/plugins/install_spec.rb
index 3d13278d9c..afc6087c1b 100644
--- a/spec/plugins/install_spec.rb
+++ b/spec/plugins/install_spec.rb
@@ -22,6 +22,18 @@ RSpec.describe "bundler plugin install" do
plugin_should_be_installed("foo")
end
+ context "plugin is already installed" do
+ before do
+ bundle "plugin install foo --source file://#{gem_repo2}"
+ end
+
+ it "doesn't install plugin again" do
+ bundle "plugin install foo --source file://#{gem_repo2}"
+ expect(out).not_to include("Installing plugin foo")
+ expect(out).not_to include("Installed plugin foo")
+ end
+ end
+
it "installs multiple plugins" do
bundle "plugin install foo kung-foo --source file://#{gem_repo2}"
@@ -165,7 +177,7 @@ RSpec.describe "bundler plugin install" do
build_plugin "foo", "1.1.0"
end
- install_gemfile <<-G
+ gemfile <<-G
source 'file://#{gem_repo2}'
plugin 'foo', "1.0"
G