diff options
| author | Jun Aruga <jaruga@redhat.com> | 2022-03-21 15:36:51 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2022-03-23 00:01:17 +0900 |
| commit | 1ff174bfd17f80433f2cb9888eafd1c297efd2a5 (patch) | |
| tree | 01993f863e04e6e57fd335e995df0f837c6c6220 | |
| parent | a51f30c6712798fc07e57f692d0d0e5ccc59acf1 (diff) | |
[rubygems/rubygems] Fix a test for `bin/bundle update --bundler` to pass on ruby/ruby.
Consider the case that the latest Bundler version on RubyGems is higher than
the `system_bundler_version` (= `Bundler::VERSION`) in `make test-bundler` on
ruby/ruby.
See <https://bugs.ruby-lang.org/issues/18643>.
https://github.com/rubygems/rubygems/commit/bfa2f72cfa
| -rw-r--r-- | spec/bundler/commands/binstubs_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb index 198226207b..2634f43417 100644 --- a/spec/bundler/commands/binstubs_spec.rb +++ b/spec/bundler/commands/binstubs_spec.rb @@ -226,7 +226,10 @@ RSpec.describe "bundle binstubs <gem>" do it "calls through to the latest bundler version" do sys_exec "bin/bundle update --bundler", :env => { "DEBUG" => "1" } - expect(out).to include %(Using bundler #{system_bundler_version}\n) + using_bundler_line = /Using bundler ([\w\.]+)\n/.match(out) + expect(using_bundler_line).to_not be_nil + latest_version = using_bundler_line[1] + expect(Gem::Version.new(latest_version)).to be >= Gem::Version.new(system_bundler_version) end it "calls through to the explicit bundler version" do |
