summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-21 20:52:35 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-09-18 18:26:32 +0900
commit6f16ededdd5eed8bab9e4f4cb70032a151fbc405 (patch)
tree7c76814651e4b14aabf8218ac9f5e410188ff727 /spec
parentf18d88b5356d347304245c703329b82293f56efc (diff)
[bundler/bundler] Revert "Remove now meaningless warning"
This reverts commit 00b095b98fe4bd44950beaf3bc9f1d91eac7b69e. https://github.com/bundler/bundler/commit/e93bce3b20
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/install/gemfile/platform_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb
index d065e10600..4cbf238416 100644
--- a/spec/bundler/install/gemfile/platform_spec.rb
+++ b/spec/bundler/install/gemfile/platform_spec.rb
@@ -406,6 +406,25 @@ RSpec.describe "bundle install with platform conditionals" do
#{Bundler::VERSION}
L
end
+
+ context "when disable_platform_warnings is true" do
+ before { bundle! "config set disable_platform_warnings true" }
+
+ 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)}"
+
+ gem "rack", :platform => [:mingw, :mswin, :x64_mingw, :jruby]
+ G
+
+ bundle! "install"
+
+ expect(out).not_to match(/The dependency (.*) will be unused/)
+ end
+ end
end
RSpec.describe "when a gem has no architecture" do