summaryrefslogtreecommitdiff
path: root/spec/bundler/commands
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-18 13:33:25 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-18 13:33:25 +0000
commitd04963501bc057685220fa1160fb9a102dd46d57 (patch)
treef01135aaac7519197f6a8992f387176a65283d86 /spec/bundler/commands
parentbef0c0a3678d07ce40f147051fba092ee30da640 (diff)
Use ENV["BUNDLE_GEM"] instead of gem command provided by system ruby.
It break the examples of bundler. Because some examples detect the different version of system ruby than test target version like trunk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r--spec/bundler/commands/clean_spec.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb
index 158d58d67c..c18c7a195f 100644
--- a/spec/bundler/commands/clean_spec.rb
+++ b/spec/bundler/commands/clean_spec.rb
@@ -339,7 +339,8 @@ RSpec.describe "bundle clean" do
gem "rack"
G
- sys_exec! "gem list"
+ gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
+ sys_exec! "#{gem} list"
expect(out).to include("rack (1.0.0)").and include("thin (1.0)")
end
@@ -461,8 +462,9 @@ RSpec.describe "bundle clean" do
end
bundle! :update, :all => bundle_update_requires_all?
- sys_exec! "gem list"
- expect(out).to include("foo (1.0.1, 1.0)")
+ gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
+ sys_exec! "#{gem} list"
+ expect(out).to include("foo (1.0.1, 1.0)")
end
it "cleans system gems when --force is used" do
@@ -485,7 +487,8 @@ RSpec.describe "bundle clean" do
bundle "clean --force"
expect(out).to include("Removing foo (1.0)")
- sys_exec "gem list"
+ gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
+ sys_exec "#{gem} list"
expect(out).not_to include("foo (1.0)")
expect(out).to include("rack (1.0.0)")
end
@@ -519,7 +522,8 @@ RSpec.describe "bundle clean" do
expect(out).to include(system_gem_path.to_s)
expect(out).to include("grant write permissions")
- sys_exec "gem list"
+ gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
+ sys_exec "#{gem} list"
expect(out).to include("foo (1.0)")
expect(out).to include("rack (1.0.0)")
end