summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-12 15:18:32 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-12 16:31:07 +0100
commit7c1e5152b19010c95fbbfb62ddfdd753911d94b3 (patch)
tree11063a93cbe49188b7dea51432c3cec43867ebce
parentd4b6a4164ac7fac1de4c352a04e80dfd8b3a601a (diff)
downloadbundler-7c1e5152b19010c95fbbfb62ddfdd753911d94b3.tar.gz
Simplify `gem_command` to pass full args to `gem` together
-rw-r--r--spec/install/gems/compact_index_spec.rb2
-rw-r--r--spec/support/helpers.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb
index 88f5a5f24b..3f85e9ee38 100644
--- a/spec/install/gems/compact_index_spec.rb
+++ b/spec/install/gems/compact_index_spec.rb
@@ -1035,7 +1035,7 @@ Either installing with `--full-index` or running `bundle update rails` should fi
gem "activemerchant"
end
G
- gem_command! :uninstall, "activemerchant"
+ gem_command! "uninstall activemerchant"
bundle! "update rails", :artifice => "compact_index"
expect(lockfile.scan(/activemerchant \(/).size).to eq(1)
end
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index ff1a9b6823..fe142e62d9 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -180,8 +180,8 @@ module Spec
ENV["RUBYOPT"] = old
end
- def gem_command(command, args = "")
- sys_exec("#{Path.gem_bin} #{command} #{args}")
+ def gem_command(command)
+ sys_exec("#{Path.gem_bin} #{command}")
end
bang :gem_command
@@ -292,12 +292,12 @@ module Spec
def install_gem(path)
raise "OMG `#{path}` does not exist!" unless File.exist?(path)
- gem_command! :install, "--no-document --ignore-dependencies '#{path}'"
+ gem_command! "install --no-document --ignore-dependencies '#{path}'"
end
def with_built_bundler
with_root_gemspec do |gemspec|
- in_repo_root { gem_command! :build, gemspec.to_s }
+ in_repo_root { gem_command! "build #{gemspec}" }
end
bundler_path = root + "bundler-#{Bundler::VERSION}.gem"
@@ -406,7 +406,7 @@ module Spec
ENV["GEM_PATH"] = system_gem_path.to_s
gems.each do |gem|
- gem_command! :install, "--no-document #{gem}"
+ gem_command! "install --no-document #{gem}"
end
return unless block_given?
begin