diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-08-15 16:45:04 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-17 17:08:50 +0900 |
commit | e38994d2f70ac714f749f69833fce5c5e8461513 (patch) | |
tree | 67d2e9c3c50a39f66fb64747927a8e88d283ad2c /spec/bundler | |
parent | 63d78afc2d0520cff300494fd875c905349c12a0 (diff) |
[bundler/bundler] Reuse `gem_command!` helper
https://github.com/bundler/bundler/commit/37d5dedffe
Diffstat (limited to 'spec/bundler')
-rw-r--r-- | spec/bundler/commands/clean_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb index 2243a72b3d..d3161c3adb 100644 --- a/spec/bundler/commands/clean_spec.rb +++ b/spec/bundler/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 |