Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit e5b3bf5

Browse files
committed
Refactor Windows CI exclusions
1 parent 40d09a1 commit e5b3bf5

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

lib/rspec/support/spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636

3737
c.example_status_persistence_file_path = "./spec/examples.txt"
3838

39-
c.define_derived_metadata :failing_on_appveyor do |meta|
40-
meta[:pending] ||= "This spec fails on AppVeyor and needs someone to fix it."
41-
end if ENV['APPVEYOR']
39+
c.define_derived_metadata :failing_on_windows_ci do |meta|
40+
meta[:pending] ||= "This spec fails on Windows CI and needs someone to fix it."
41+
end if RSpec::Support::OS.windows? && ENV['CI']
4242
end
4343

4444
module RSpec

spec/rspec/support/directory_maker_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def directory_exists?(dirname)
2828
context "when a file already exists" do
2929
before { File.open("tmp", "w") }
3030

31-
it "raises, as it can't make the directory", :failing_on_appveyor,
32-
:pending => false,
33-
:skip => (ENV['APPVEYOR'] ? "Failing on AppVeyor but :pending isn't working for some reason" : false) do
31+
it "raises, as it can't make the directory", :failing_on_windows_ci do
3432
expect {
3533
mkdir_p.call(dirname)
3634
}.to raise_error(Errno::EEXIST)

spec/rspec/support/spec/stderr_splitter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
stderr_methods -= [:birthtime] if RUBY_VERSION =~ /^2\.2/
3333

3434
# No idea why, but on our AppVeyor windows builds it doesn't respond to these...
35-
stderr_methods -= [:close_on_exec?, :close_on_exec=] if RSpec::Support::OS.windows?
35+
stderr_methods -= [:close_on_exec?, :close_on_exec=] if RSpec::Support::OS.windows? && ENV['CI']
3636

3737
expect(splitter).to respond_to(*stderr_methods)
3838
end

0 commit comments

Comments
 (0)