summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-08-21 20:13:03 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commitc119dd2b5a0466ba317c2b5981c686355d7e3b6e (patch)
tree57d6247719891c06b3238e2b47bf9cab4bb42ddc /spec
parentc044f818ca47511dceefcdddba64e4f144e8c731 (diff)
[rubygems/rubygems] Fix `bundle plugin install` misdetection of installed versions
https://github.com/rubygems/rubygems/commit/9c88db949d
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/plugins/install_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/bundler/plugins/install_spec.rb b/spec/bundler/plugins/install_spec.rb
index b382d3ccd2..009516260a 100644
--- a/spec/bundler/plugins/install_spec.rb
+++ b/spec/bundler/plugins/install_spec.rb
@@ -69,6 +69,21 @@ RSpec.describe "bundler plugin install" do
plugin_should_be_installed("foo", "kung-foo")
end
+ it "installs the latest version if not installed" do
+ update_repo2 do
+ build_plugin "foo", "1.1"
+ end
+
+ bundle "plugin install foo --version 1.0 --source #{file_uri_for(gem_repo2)} --verbose"
+ expect(out).to include("Installing foo 1.0")
+
+ bundle "plugin install foo --source #{file_uri_for(gem_repo2)} --verbose"
+ expect(out).to include("Installing foo 1.1")
+
+ bundle "plugin install foo --source #{file_uri_for(gem_repo2)} --verbose"
+ expect(out).to include("Using foo 1.1")
+ end
+
it "works with different load paths" do
build_repo2 do
build_plugin "testing" do |s|