summaryrefslogtreecommitdiff
path: root/spec/bundler/install/gemfile/platform_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 14:19:04 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-13 07:54:37 +0900
commit0e60b59d5884edb8f9aea023efd9b24f1ff02049 (patch)
treee52935ce510440872ca5ce6b0e092cbc94f18bc9 /spec/bundler/install/gemfile/platform_spec.rb
parent68224651a4d4dc3ce0cea666f5423dd8b6ba6cfc (diff)
Update the bundler version with master branch
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3086
Diffstat (limited to 'spec/bundler/install/gemfile/platform_spec.rb')
-rw-r--r--spec/bundler/install/gemfile/platform_spec.rb46
1 files changed, 24 insertions, 22 deletions
diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb
index c096531398..e33cb29ef8 100644
--- a/spec/bundler/install/gemfile/platform_spec.rb
+++ b/spec/bundler/install/gemfile/platform_spec.rb
@@ -274,6 +274,8 @@ end
RSpec.describe "bundle install with platform conditionals" do
it "installs gems tagged w/ the current platforms" do
+ skip "platform issues" if Gem.win_platform?
+
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
@@ -299,6 +301,8 @@ RSpec.describe "bundle install with platform conditionals" do
end
it "installs gems tagged w/ the current platforms inline" do
+ skip "platform issues" if Gem.win_platform?
+
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "nokogiri", :platforms => :#{local_tag}
@@ -317,6 +321,8 @@ RSpec.describe "bundle install with platform conditionals" do
end
it "installs gems tagged w/ the current platform inline" do
+ skip "platform issues" if Gem.win_platform?
+
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "nokogiri", :platform => :#{local_tag}
@@ -347,7 +353,6 @@ RSpec.describe "bundle install with platform conditionals" do
it "does not attempt to install gems from :rbx when using --local" do
simulate_platform "ruby"
- simulate_ruby_engine "ruby"
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
@@ -360,7 +365,6 @@ RSpec.describe "bundle install with platform conditionals" do
it "does not attempt to install gems from other rubies when using --local" do
simulate_platform "ruby"
- simulate_ruby_engine "ruby"
other_ruby_version_tag = RUBY_VERSION =~ /^1\.8/ ? :ruby_19 : :ruby_18
gemfile <<-G
@@ -372,9 +376,8 @@ RSpec.describe "bundle install with platform conditionals" do
expect(out).not_to match(/Could not find gem 'some_gem/)
end
- it "prints a helpful warning when a dependency is unused on any platform" do
+ it "resolves all platforms by default and without warning messages" do
simulate_platform "ruby"
- simulate_ruby_engine "ruby"
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
@@ -384,28 +387,27 @@ RSpec.describe "bundle install with platform conditionals" do
bundle! "install"
- expect(err).to include <<-O.strip
-The dependency #{Gem::Dependency.new("rack", ">= 0")} will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
- O
- end
-
- context "when disable_platform_warnings is true" do
- before { bundle! "config set disable_platform_warnings true" }
+ expect(err).to be_empty
- it "does not print the warning when a dependency is unused on any platform" do
- simulate_platform "ruby"
- simulate_ruby_engine "ruby"
-
- gemfile <<-G
- source "#{file_uri_for(gem_repo1)}"
+ lockfile_should_be <<-L
+ GEM
+ remote: #{file_uri_for(gem_repo1)}/
+ specs:
+ rack (1.0.0)
- gem "rack", :platform => [:mingw, :mswin, :x64_mingw, :jruby]
- G
+ PLATFORMS
+ java
+ ruby
+ x64-mingw32
+ x86-mingw32
+ x86-mswin32
- bundle! "install"
+ DEPENDENCIES
+ rack
- expect(out).not_to match(/The dependency (.*) will be unused/)
- end
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
end
end