diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-10-30 18:06:49 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-11-04 17:47:32 +0100 |
commit | 821d431e0f38b3d2ea56a568a1ce03a573a217ce (patch) | |
tree | c3aed554b9751da12464506c2e9af42490bd2815 | |
parent | be9d1e0a8f8aeb79e55b7a7a84bf69bb3d650fd3 (diff) | |
download | bundler-821d431e0f38b3d2ea56a568a1ce03a573a217ce.tar.gz |
Remove `spec` helper in favor of `spec_dir`
The `spec` name is too common inside specs for `Gem::Specification`'s.
-rw-r--r-- | spec/commands/newgem_spec.rb | 2 | ||||
-rw-r--r-- | spec/realworld/double_check_spec.rb | 2 | ||||
-rw-r--r-- | spec/realworld/edgecases_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/helpers.rb | 6 |
4 files changed, 4 insertions, 8 deletions
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 18a30ca9db..52a6c11972 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -181,7 +181,7 @@ RSpec.describe "bundle gem" do context "when git is not available" do # This spec cannot have `git` available in the test env before do - load_paths = [lib, spec] + load_paths = [lib, spec_dir] load_path_str = "-I#{load_paths.join(File::PATH_SEPARATOR)}" sys_exec "#{Gem.ruby} #{load_path_str} #{bindir.join("bundle")} gem #{gem_name}", "PATH" => "" diff --git a/spec/realworld/double_check_spec.rb b/spec/realworld/double_check_spec.rb index 510c1be50f..ce12d1566f 100644 --- a/spec/realworld/double_check_spec.rb +++ b/spec/realworld/double_check_spec.rb @@ -26,7 +26,7 @@ RSpec.describe "double checking sources", :realworld => true, :sometimes => true cmd = <<-RUBY require "#{lib}/bundler" - require "#{spec}/support/artifice/vcr" + require "#{spec_dir}/support/artifice/vcr" require "#{lib}/bundler/inline" gemfile(true) do source "https://rubygems.org" diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb index 5a7d2c5787..dfddd124d8 100644 --- a/spec/realworld/edgecases_spec.rb +++ b/spec/realworld/edgecases_spec.rb @@ -3,7 +3,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do def rubygems_version(name, requirement) ruby! <<-RUBY - require "#{spec}/support/artifice/vcr" + require "#{spec_dir}/support/artifice/vcr" require "#{lib}/bundler" require "#{lib}/bundler/source/rubygems/remote" require "#{lib}/bundler/fetcher" diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 76a1f77b72..0c4dcbbe95 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -96,10 +96,6 @@ module Spec run(cmd, *args) end - def spec - spec_dir.to_s - end - def bundle(cmd, options = {}) with_sudo = options.delete(:sudo) sudo = with_sudo == :preserve_env ? "sudo -E" : "sudo" if with_sudo @@ -132,7 +128,7 @@ module Spec load_path = [] load_path << lib unless system_bundler - load_path << spec + load_path << spec_dir load_path_str = "-I#{load_path.join(File::PATH_SEPARATOR)}" args = options.map do |k, v| |