summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAgis Anastasopoulos <agis.anast@gmail.com>2015-10-25 12:19:14 +0200
committerAgis Anastasopoulos <agis.anast@gmail.com>2015-10-25 13:08:25 +0200
commit7df03e65bfbfc6e72eac6a8c726fb936d7eee8b5 (patch)
tree35b08e29afb9b99e97703d1c065aa2342be0c72a /spec
parent0c459df96d11a917a37fb23262099700abed261f (diff)
downloadbundler-7df03e65bfbfc6e72eac6a8c726fb936d7eee8b5.tar.gz
Warn if RUBYGEMS_GEMDEPS env. variable is setrubygems-gemdeps-warn
Closes #3656.
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/cli_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb
index 1d5ee7b072..a2f87e45fa 100644
--- a/spec/bundler/cli_spec.rb
+++ b/spec/bundler/cli_spec.rb
@@ -37,4 +37,20 @@ describe "bundle executable" do
should_be_installed "rack 1.0.0"
end
end
+
+ context "when ENV['RUBYGEMS_GEMDEPS'] is set" do
+ it "displays a warning" do
+ gemfile bundled_app("Gemfile"), <<-G
+ source "file://#{gem_repo1}"
+ gem 'rack'
+ G
+
+ bundle :install, :env => { "RUBYGEMS_GEMDEPS" => "foo" }
+ expect(out).to include("RUBYGEMS_GEMDEPS")
+ expect(out).to include("conflict with Bundler")
+
+ bundle :install, :env => { "RUBYGEMS_GEMDEPS" => "" }
+ expect(out).not_to include("RUBYGEMS_GEMDEPS")
+ end
+ end
end