32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
|
From 26e5ba521208706ae68f19062d4ad24ad257aa47 Mon Sep 17 00:00:00 2001
|
||
|
From: Jun Aruga <jaruga@redhat.com>
|
||
|
Date: Mon, 15 Apr 2024 15:46:30 +0200
|
||
|
Subject: [PATCH] Make a test depending on the rubyzip gem optional.
|
||
|
|
||
|
Because I still want to pass the nokogiri's unit tests in a downstream nokogiri
|
||
|
package on a Linux distro such as CentOS 10 Stream and RHEL 10, where we don't
|
||
|
want to manage the rubyzip gem[1].
|
||
|
|
||
|
[1] https://rubygems.org/gems/rubyzip
|
||
|
---
|
||
|
test/xml/test_document_encoding.rb | 6 +++++-
|
||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/test/xml/test_document_encoding.rb b/test/xml/test_document_encoding.rb
|
||
|
index cd8b1b4da2..c0cb93b283 100644
|
||
|
--- a/test/xml/test_document_encoding.rb
|
||
|
+++ b/test/xml/test_document_encoding.rb
|
||
|
@@ -91,7 +91,11 @@ class TestDocumentEncoding < Nokogiri::TestCase
|
||
|
describe "pseudo-IO" do
|
||
|
it "serializes correctly with Zip::OutputStream objects" do
|
||
|
# https://github.com/sparklemotion/nokogiri/issues/2773
|
||
|
- require "zip"
|
||
|
+ begin
|
||
|
+ require "zip"
|
||
|
+ rescue LoadError
|
||
|
+ skip("rubyzip is not installed")
|
||
|
+ end
|
||
|
|
||
|
xml = <<~XML
|
||
|
<?xml version="1.0" encoding="UTF-8"?>
|