summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-04 02:30:26 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-07 09:57:10 +0100
commit0286c16da115dc611ece1f0b18dfbf69e3ee98d7 (patch)
tree87d5b23b6ecd9b44c05a455ffd793c896934f798 /spec
parent9edcb1cd2a19e27ceee06a671f18cdf75416e3c9 (diff)
downloadbundler-0286c16da115dc611ece1f0b18dfbf69e3ee98d7.tar.gz
Use OS-independent path separator
Diffstat (limited to 'spec')
-rw-r--r--spec/runtime/setup_spec.rb4
-rw-r--r--spec/runtime/with_unbundled_env_spec.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 7f00a63078..bffa1b20bb 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -708,7 +708,7 @@ end
end
context "when the user has one set" do
- before { ENV["MANPATH"] = "/foo:" }
+ before { ENV["MANPATH"] = "/foo#{File::PATH_SEPARATOR}" }
it "adds the gem's man dir to the MANPATH" do
install_gemfile! <<-G
@@ -717,7 +717,7 @@ end
G
run! "puts ENV['MANPATH']"
- expect(out).to eq("#{default_bundle_path("gems/with_man-1.0/man")}:/foo")
+ expect(out).to eq("#{default_bundle_path("gems/with_man-1.0/man")}#{File::PATH_SEPARATOR}/foo")
end
end
diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb
index 4aaf9d499c..cc3ea8d871 100644
--- a/spec/runtime/with_unbundled_env_spec.rb
+++ b/spec/runtime/with_unbundled_env_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe "Bundler.with_env helpers" do
it "should return the GEM_PATH present before bundle was activated" do
code = "print Bundler.original_env['GEM_PATH']"
- gem_path = ENV["GEM_PATH"] + ":/foo"
+ gem_path = ENV["GEM_PATH"] + "#{File::PATH_SEPARATOR}/foo"
with_gem_path_as(gem_path) do
bundle_exec_ruby!(code.dump)
expect(last_command.stdboth).to eq(gem_path)
@@ -35,9 +35,9 @@ RSpec.describe "Bundler.with_env helpers" do
create_file("exe.rb", <<-'RB')
count = ARGV.first.to_i
exit if count < 0
- STDERR.puts "#{count} #{ENV["PATH"].end_with?(":/foo")}"
+ STDERR.puts "#{count} #{ENV["PATH"].end_with?("#{File::PATH_SEPARATOR}/foo")}"
if count == 2
- ENV["PATH"] = "#{ENV["PATH"]}:/foo"
+ ENV["PATH"] = "#{ENV["PATH"]}#{File::PATH_SEPARATOR}/foo"
end
exec(Gem.ruby, __FILE__, (count - 1).to_s)
RB