summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-15 16:45:04 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-16 08:43:48 +0200
commit37d5dedffe875782bb8fcb16e11fad4851dde51c (patch)
treeef1f374520b7fcfe56c140a8f739dfff9cd53278
parent17d4d0de8e10e6f7b5cd612d0770f8657041e1cc (diff)
downloadbundler-37d5dedffe875782bb8fcb16e11fad4851dde51c.tar.gz
Reuse `gem_command!` helper
-rw-r--r--spec/commands/clean_spec.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index 2243a72b3d..d3161c3adb 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -361,8 +361,7 @@ RSpec.describe "bundle clean" do
gem "rack"
G
- gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
- sys_exec! "#{gem} list"
+ gem_command! :list
expect(out).to include("rack (1.0.0)").and include("thin (1.0)")
end
@@ -484,8 +483,7 @@ RSpec.describe "bundle clean" do
end
bundle! :update, :all => true
- gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
- sys_exec! "#{gem} list"
+ gem_command! :list
expect(out).to include("foo (1.0.1, 1.0)")
end
@@ -509,8 +507,7 @@ RSpec.describe "bundle clean" do
bundle "clean --force"
expect(out).to include("Removing foo (1.0)")
- gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
- sys_exec "#{gem} list"
+ gem_command! :list
expect(out).not_to include("foo (1.0)")
expect(out).to include("rack (1.0.0)")
end
@@ -544,8 +541,7 @@ RSpec.describe "bundle clean" do
expect(err).to include(system_gem_path.to_s)
expect(err).to include("grant write permissions")
- gem = ruby_core? ? ENV["BUNDLE_GEM"] : "gem"
- sys_exec "#{gem} list"
+ gem_command! :list
expect(out).to include("foo (1.0)")
expect(out).to include("rack (1.0.0)")
end