diff options
Diffstat (limited to 'spec/bundler/plugins/uninstall_spec.rb')
-rw-r--r-- | spec/bundler/plugins/uninstall_spec.rb | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/spec/bundler/plugins/uninstall_spec.rb b/spec/bundler/plugins/uninstall_spec.rb index 8180241911..dedcc9f37c 100644 --- a/spec/bundler/plugins/uninstall_spec.rb +++ b/spec/bundler/plugins/uninstall_spec.rb @@ -14,7 +14,7 @@ RSpec.describe "bundler plugin uninstall" do end it "uninstalls specified plugins" do - bundle "plugin install foo kung-foo --source #{file_uri_for(gem_repo2)}" + bundle "plugin install foo kung-foo --source https://gem.repo2" plugin_should_be_installed("foo") plugin_should_be_installed("kung-foo") @@ -30,9 +30,34 @@ RSpec.describe "bundler plugin uninstall" do plugin_should_not_be_installed("foo") end + it "doesn't wipe out path plugins" do + build_lib "path_plugin" do |s| + s.write "plugins.rb" + end + path = lib_path("path_plugin-1.0") + expect(path).to be_a_directory + + allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile) + + install_gemfile <<-G + source 'https://gem.repo2' + plugin 'path_plugin', :path => "#{path}" + gem 'myrack', '1.0.0' + G + + plugin_should_be_installed("path_plugin") + expect(Bundler::Plugin.index.plugin_path("path_plugin")).to eq path + + bundle "plugin uninstall path_plugin" + expect(out).to include("Uninstalled plugin path_plugin") + plugin_should_not_be_installed("path_plugin") + # the actual gem still exists though + expect(path).to be_a_directory + end + describe "with --all" do it "uninstalls all installed plugins" do - bundle "plugin install foo kung-foo --source #{file_uri_for(gem_repo2)}" + bundle "plugin install foo kung-foo --source https://gem.repo2" plugin_should_be_installed("foo") plugin_should_be_installed("kung-foo") |