summaryrefslogtreecommitdiff
path: root/spec/install
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install')
-rw-r--r--spec/install/gemfile/platform_spec.rb4
-rw-r--r--spec/install/gems/resolving_spec.rb11
2 files changed, 9 insertions, 6 deletions
diff --git a/spec/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb
index eab5e7f00c..52e1cf86fa 100644
--- a/spec/install/gemfile/platform_spec.rb
+++ b/spec/install/gemfile/platform_spec.rb
@@ -379,8 +379,6 @@ RSpec.describe "bundle install with platform conditionals" do
end
it "prints a helpful warning when a dependency is unused on any platform" do
- skip "prints warning but bundle install fails" if Gem.win_platform?
-
simulate_platform "ruby"
simulate_ruby_engine "ruby"
@@ -401,8 +399,6 @@ The dependency #{Gem::Dependency.new("rack", ">= 0")} will be unused by any of t
before { bundle! "config set disable_platform_warnings true" }
it "does not print the warning when a dependency is unused on any platform" do
- skip "skips warning but bundle install fails" if Gem.win_platform?
-
simulate_platform "ruby"
simulate_ruby_engine "ruby"
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index 523f9eb151..547d13134f 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -156,6 +156,13 @@ RSpec.describe "bundle install with install-time dependencies" do
let(:ruby_requirement) { %("#{RUBY_VERSION}") }
let(:error_message_requirement) { "~> #{RUBY_VERSION}.0" }
+ let(:error_message_platform) do
+ if Bundler.feature_flag.specific_platform?
+ " #{Bundler.local_platform}"
+ else
+ ""
+ end
+ end
shared_examples_for "ruby version conflicts" do
it "raises an error during resolution" do
@@ -172,9 +179,9 @@ RSpec.describe "bundle install with install-time dependencies" do
nice_error = strip_whitespace(<<-E).strip
Bundler found conflicting requirements for the Ruby\0 version:
In Gemfile:
- Ruby\0 (#{error_message_requirement})
+ Ruby\0 (#{error_message_requirement})#{error_message_platform}
- require_ruby was resolved to 1.0, which depends on
+ require_ruby#{error_message_platform} was resolved to 1.0, which depends on
Ruby\0 (> 9000)
Ruby\0 (> 9000), which is required by gem 'require_ruby', is not available in the local ruby installation