diff options
author | Bundlerbot <bot@bundler.io> | 2020-01-04 18:58:27 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2020-01-04 18:58:27 +0000 |
commit | 2cf1cf2b5468ff227216b7a4bd013d898e944d65 (patch) | |
tree | a7f4f6dba264bd954582e9dfbad7fb693c9d103a | |
parent | aa074c9f5de0e43c2187d387e6a25d55b01ec75a (diff) | |
parent | 63f42960ff1377537dc539db9c667d2e0fcf4d7a (diff) | |
download | bundler-2cf1cf2b5468ff227216b7a4bd013d898e944d65.tar.gz |
Merge #7544
7544: Ignore tests needing file permissions on Windows r=deivid-rodriguez a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was that some specs fail under Windows because permissions are not supported the way they are supported on Unix.
### What is your fix for the problem, implemented in this PR?
My fix is to exclude this tests on Windows.
### Why did you choose this fix out of the possible options?
I chose this fix because it was proposed at https://github.com/bundler/bundler/issues/6897 and makes sense to me.
Closes #6897.
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
-rw-r--r-- | spec/commands/clean_spec.rb | 2 | ||||
-rw-r--r-- | spec/commands/doctor_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/filters.rb | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb index 5cc97de912..471ddb0805 100644 --- a/spec/commands/clean_spec.rb +++ b/spec/commands/clean_spec.rb @@ -536,7 +536,7 @@ RSpec.describe "bundle clean" do expect(out).to include("rack (1.0.0)") end - describe "when missing permissions" do + describe "when missing permissions", :permissions do before { ENV["BUNDLE_PATH__SYSTEM"] = "true" } let(:system_cache_path) { system_gem_path("cache") } after do diff --git a/spec/commands/doctor_spec.rb b/spec/commands/doctor_spec.rb index d829f00092..e62430d215 100644 --- a/spec/commands/doctor_spec.rb +++ b/spec/commands/doctor_spec.rb @@ -87,7 +87,7 @@ RSpec.describe "bundle doctor" do expect(@stdout.string).not_to include("No issues") end - context "when home contains files that are not owned by the current process" do + context "when home contains files that are not owned by the current process", :permissions do before(:each) do allow(@stat).to receive(:uid) { 0o0000 } end diff --git a/spec/support/filters.rb b/spec/support/filters.rb index 4ce6648cdc..564bdece13 100644 --- a/spec/support/filters.rb +++ b/spec/support/filters.rb @@ -40,6 +40,7 @@ RSpec.configure do |config| config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0]) config.filter_run_excluding :ruby_repo => !ENV["GEM_COMMAND"].nil? config.filter_run_excluding :no_color_tty => Gem.win_platform? || !ENV["GITHUB_ACTION"].nil? + config.filter_run_excluding :permissions => Gem.win_platform? config.filter_run_when_matching :focus unless ENV["CI"] end |