diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-18 12:13:33 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-18 13:33:18 +0900 |
commit | 0e40cc9b194a5e46024d32b85a61e651372a65cb (patch) | |
tree | d91f781ca34d78897d8cea9fb3403e47f891df5a /spec/bundler/commands | |
parent | 34f06062174882a98ebef998c50ad8d4f7fc0f2e (diff) |
Merge RubyGems 3.2.2 and Bundler 2.2.2
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3930
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r-- | spec/bundler/commands/console_spec.rb | 8 | ||||
-rw-r--r-- | spec/bundler/commands/lock_spec.rb | 41 |
2 files changed, 45 insertions, 4 deletions
diff --git a/spec/bundler/commands/console_spec.rb b/spec/bundler/commands/console_spec.rb index 6f1e96261e..aa76096e3d 100644 --- a/spec/bundler/commands/console_spec.rb +++ b/spec/bundler/commands/console_spec.rb @@ -55,10 +55,10 @@ RSpec.describe "bundle console", :bundler => "< 3", :readline => true do it "uses IRB as default console" do bundle "console" do |input, _, _| - input.puts("__method__") + input.puts("__FILE__") input.puts("exit") end - expect(out).to include(":irb_binding") + expect(out).to include("(irb)") end it "starts another REPL if configured as such" do @@ -80,10 +80,10 @@ RSpec.describe "bundle console", :bundler => "< 3", :readline => true do # make sure pry isn't there bundle "console" do |input, _, _| - input.puts("__method__") + input.puts("__FILE__") input.puts("exit") end - expect(out).to include(":irb_binding") + expect(out).to include("(irb)") end it "doesn't load any other groups" do diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb index cc56c34952..6400152039 100644 --- a/spec/bundler/commands/lock_spec.rb +++ b/spec/bundler/commands/lock_spec.rb @@ -342,6 +342,47 @@ RSpec.describe "bundle lock" do G end + it "doesn't crash when an update candidate doesn't have any matching platform" do + build_repo4 do + build_gem "libv8", "8.4.255.0" + build_gem "libv8", "8.4.255.0" do |s| + s.platform = "x86_64-darwin-19" + end + + build_gem "libv8", "15.0.71.48.1beta2" do |s| + s.platform = "x86_64-linux" + end + end + + gemfile <<-G + source "#{file_uri_for(gem_repo4)}" + + gem "libv8" + G + + lockfile <<-G + GEM + remote: #{file_uri_for(gem_repo4)}/ + specs: + libv8 (8.4.255.0) + libv8 (8.4.255.0-x86_64-darwin-19) + + PLATFORMS + ruby + x86_64-darwin-19 + + DEPENDENCIES + libv8 + + BUNDLED WITH + #{Bundler::VERSION} + G + + simulate_platform(Gem::Platform.new("x86_64-darwin-19")) { bundle "lock --update" } + + expect(out).to match(/Writing lockfile to.+Gemfile\.lock/) + end + context "when an update is available" do let(:repo) { gem_repo2 } |