summaryrefslogtreecommitdiff
path: root/spec/support/helpers.rb
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 /spec/support/helpers.rb
parentd4b6a4164ac7fac1de4c352a04e80dfd8b3a601a (diff)
downloadbundler-7c1e5152b19010c95fbbfb62ddfdd753911d94b3.tar.gz
Simplify `gem_command` to pass full args to `gem` together
Diffstat (limited to 'spec/support/helpers.rb')
-rw-r--r--spec/support/helpers.rb10
1 files changed, 5 insertions, 5 deletions
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