diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 07:05:03 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 15:23:26 +0100 |
commit | b5de85ea309f401bfbc460e75d8ceaa6f8719a4d (patch) | |
tree | 188de3e87d506ee21e3a46da16ccfd47af480198 /spec/bundler/bundler_spec.rb | |
parent | e70d0f3d02c8c084b61969e71d1fa28a15a6d0ca (diff) | |
download | bundler-b5de85ea309f401bfbc460e75d8ceaa6f8719a4d.tar.gz |
Adapt `Bundler#which` test to Windowsadapt_bundler_which_test_to_windows
Diffstat (limited to 'spec/bundler/bundler_spec.rb')
-rw-r--r-- | spec/bundler/bundler_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb index 247838600b..27477465bb 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 |