diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-07-13 12:56:36 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-07-13 14:11:55 +0900 |
commit | 437a5ae9d6d60bd1972641167a98204007bd1c0b (patch) | |
tree | 79b9ea49442fe896dbd8ef59a8622ea010fb3fb7 /spec/bundler/other | |
parent | e3a988a29c2cfa4a7e2e045d82989a7342955be8 (diff) | |
download | ruby-437a5ae9d6d60bd1972641167a98204007bd1c0b.tar.gz |
Merge RubyGems and Bundler master
Diffstat (limited to 'spec/bundler/other')
-rw-r--r-- | spec/bundler/other/ext_spec.rb | 4 | ||||
-rw-r--r-- | spec/bundler/other/platform_spec.rb | 58 |
2 files changed, 31 insertions, 31 deletions
diff --git a/spec/bundler/other/ext_spec.rb b/spec/bundler/other/ext_spec.rb index e13f62a856..9b829a2b36 100644 --- a/spec/bundler/other/ext_spec.rb +++ b/spec/bundler/other/ext_spec.rb @@ -44,6 +44,10 @@ RSpec.describe "Bundler::GemHelpers#generic" do expect(generic(pl("x64-mingw32"))).to eq(pl("x64-mingw32")) expect(generic(pl("x86_64-mingw32"))).to eq(pl("x64-mingw32")) end + + it "converts 64-bit mingw UCRT platform variants into x64-mingw-ucrt" do + expect(generic(pl("x64-mingw-ucrt"))).to eq(pl("x64-mingw-ucrt")) + end end RSpec.describe "Gem::SourceIndex#refresh!" do diff --git a/spec/bundler/other/platform_spec.rb b/spec/bundler/other/platform_spec.rb index bf38a05646..c157345cab 100644 --- a/spec/bundler/other/platform_spec.rb +++ b/spec/bundler/other/platform_spec.rb @@ -2,10 +2,6 @@ RSpec.describe "bundle platform" do context "without flags" do - let(:bundle_platform_platforms_string) do - local_platforms.reverse.map {|pl| "* #{pl}" }.join("\n") - end - it "returns all the output" do gemfile <<-G source "#{file_uri_for(gem_repo1)}" @@ -20,7 +16,7 @@ RSpec.describe "bundle platform" do Your platform is: #{Gem::Platform.local} Your app has gems that work on these platforms: -#{bundle_platform_platforms_string} +* #{specific_local_platform} Your Gemfile specifies a Ruby version requirement: * ruby #{RUBY_VERSION} @@ -43,7 +39,7 @@ G Your platform is: #{Gem::Platform.local} Your app has gems that work on these platforms: -#{bundle_platform_platforms_string} +* #{specific_local_platform} Your Gemfile specifies a Ruby version requirement: * ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} @@ -64,7 +60,7 @@ G Your platform is: #{Gem::Platform.local} Your app has gems that work on these platforms: -#{bundle_platform_platforms_string} +* #{specific_local_platform} Your Gemfile does not specify a Ruby version requirement. G @@ -84,7 +80,7 @@ G Your platform is: #{Gem::Platform.local} Your app has gems that work on these platforms: -#{bundle_platform_platforms_string} +* #{specific_local_platform} Your Gemfile specifies a Ruby version requirement: * ruby #{not_local_ruby_version} @@ -305,7 +301,7 @@ G expect(bundled_app_lock).to exist end - it "installs fine with any engine", :jruby do + it "installs fine with any engine", :jruby_only do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" @@ -351,7 +347,7 @@ G should_be_engine_incorrect end - it "doesn't install when engine version doesn't match", :jruby do + it "doesn't install when engine version doesn't match", :jruby_only do install_gemfile <<-G, :raise_on_error => false source "#{file_uri_for(gem_repo1)}" gem "rack" @@ -394,7 +390,7 @@ G expect(out).to match(/\AResolving dependencies\.\.\.\.*\nThe Gemfile's dependencies are satisfied\z/) end - it "checks fine with any engine", :jruby do + it "checks fine with any engine", :jruby_only do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" @@ -445,7 +441,7 @@ G should_be_engine_incorrect end - it "fails when engine version doesn't match", :jruby do + it "fails when engine version doesn't match", :jruby_only do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" @@ -511,7 +507,7 @@ G expect(the_bundle).to include_gems "rack 1.2", "rack-obama 1.0", "activesupport 3.0" end - it "updates fine with any engine", :jruby do + it "updates fine with any engine", :jruby_only do gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "activesupport" @@ -547,7 +543,7 @@ G should_be_ruby_version_incorrect end - it "fails when ruby engine doesn't match", :jruby do + it "fails when ruby engine doesn't match", :jruby_only do gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "activesupport" @@ -563,7 +559,7 @@ G should_be_engine_incorrect end - it "fails when ruby engine version doesn't match", :jruby do + it "fails when ruby engine version doesn't match", :jruby_only do gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "activesupport" @@ -615,7 +611,7 @@ G expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s) end - it "prints path if ruby version is correct for any engine", :jruby do + it "prints path if ruby version is correct for any engine", :jruby_only do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" @@ -651,7 +647,7 @@ G should_be_engine_incorrect end - it "fails if engine version doesn't match", :bundler => "< 3", :jruby => true do + it "fails if engine version doesn't match", :bundler => "< 3", :jruby_only => true do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" @@ -699,7 +695,7 @@ G expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist end - it "copies the .gem file to vendor/cache when ruby version matches for any engine", :jruby do + it "copies the .gem file to vendor/cache when ruby version matches for any engine", :jruby_only do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' @@ -735,7 +731,7 @@ G should_be_engine_incorrect end - it "fails if the engine version doesn't match", :jruby do + it "fails if the engine version doesn't match", :jruby_only do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' @@ -780,7 +776,7 @@ G expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist end - it "copies the .gem file to vendor/cache when ruby version matches any engine", :jruby do + it "copies the .gem file to vendor/cache when ruby version matches any engine", :jruby_only do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' @@ -816,7 +812,7 @@ G should_be_engine_incorrect end - it "fails if the engine version doesn't match", :jruby do + it "fails if the engine version doesn't match", :jruby_only do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' @@ -859,7 +855,7 @@ G expect(out).to include("0.9.1") end - it "activates the correct gem when ruby version matches any engine", :jruby do + it "activates the correct gem when ruby version matches any engine", :jruby_only do system_gems "rack-1.0.0", "rack-0.9.1", :path => default_bundle_path gemfile <<-G source "#{file_uri_for(gem_repo1)}" @@ -896,7 +892,7 @@ G should_be_engine_incorrect end - # it "fails when the engine version doesn't match", :jruby do + # it "fails when the engine version doesn't match", :jruby_only do # gemfile <<-G # gem "rack", "0.9.1" # @@ -947,7 +943,7 @@ G expect(out).to include("0.9.1") end - it "starts IRB with the default group loaded when ruby version matches", :readline, :jruby do + it "starts IRB with the default group loaded when ruby version matches", :readline, :jruby_only do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" @@ -992,7 +988,7 @@ G should_be_engine_incorrect end - it "fails when engine version doesn't match", :jruby do + it "fails when engine version doesn't match", :jruby_only do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" @@ -1047,7 +1043,7 @@ G expect(bundled_app_lock).to exist end - it "makes a Gemfile.lock if setup succeeds for any engine", :jruby do + it "makes a Gemfile.lock if setup succeeds for any engine", :jruby_only do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "yard" @@ -1096,7 +1092,7 @@ G should_be_engine_incorrect end - it "fails when engine version doesn't match", :jruby do + it "fails when engine version doesn't match", :jruby_only do install_gemfile <<-G, :raise_on_error => false source "#{file_uri_for(gem_repo1)}" gem "yard" @@ -1169,7 +1165,7 @@ G expect(out).to match(Regexp.new(expected_output)) end - it "returns list of outdated gems when the ruby version matches for any engine", :jruby do + it "returns list of outdated gems when the ruby version matches for any engine", :jruby_only do bundle :install update_repo2 do build_gem "activesupport", "3.0" @@ -1231,7 +1227,7 @@ G should_be_engine_incorrect end - it "fails when the engine version doesn't match", :jruby do + it "fails when the engine version doesn't match", :jruby_only do update_repo2 do build_gem "activesupport", "3.0" update_git "foo", :path => lib_path("foo") @@ -1249,7 +1245,7 @@ G should_be_engine_version_incorrect end - it "fails when the patchlevel doesn't match", :jruby do + it "fails when the patchlevel doesn't match", :jruby_only do update_repo2 do build_gem "activesupport", "3.0" update_git "foo", :path => lib_path("foo") @@ -1267,7 +1263,7 @@ G should_be_patchlevel_incorrect end - it "fails when the patchlevel is a fixnum", :jruby do + it "fails when the patchlevel is a fixnum", :jruby_only do update_repo2 do build_gem "activesupport", "3.0" update_git "foo", :path => lib_path("foo") |