diff options
Diffstat (limited to 'spec/bundler/bundler_spec.rb')
-rw-r--r-- | spec/bundler/bundler_spec.rb | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb index 247838600b..56ef4ce75a 100644 --- a/spec/bundler/bundler_spec.rb +++ b/spec/bundler/bundler_spec.rb @@ -124,7 +124,15 @@ RSpec.describe Bundler do describe "#which" do let(:executable) { "executable" } - let(:path) { %w[/a /b c ../d /e] } + + let(:path) do + if Gem.win_platform? + %w[C:/a C:/b C:/c C:/../d C:/e] + else + %w[/a /b c ../d /e] + end + end + let(:expected) { "executable" } before do @@ -149,7 +157,13 @@ RSpec.describe Bundler do it_behaves_like "it returns the correct executable" context "when the executable in inside a quoted path" do - let(:expected) { "/e/executable" } + let(:expected) do + if Gem.win_platform? + "C:/e/executable" + else + "/e/executable" + end + end it_behaves_like "it returns the correct executable" end @@ -196,6 +210,8 @@ EOF gem "rack" G + allow(Bundler).to receive(:root).and_return(bundled_app) + Bundler.mkdir_p(bundled_app.join("foo", "bar")) expect(bundled_app.join("foo", "bar")).to exist end @@ -322,7 +338,7 @@ EOF end context "with unwritable files in a parent dir" do - # Regression test for https://github.com/bundler/bundler/pull/6316 + # Regression test for https://github.com/rubygems/bundler/pull/6316 # It doesn't matter if there are other unwritable files so long as # bundle_path can be created before do |