Skip to content

Commit

Permalink
Make a test depending on the rubyzip gem optional. (#3177)
Browse files Browse the repository at this point in the history
**What problem is this PR intended to solve?**

We manage the nokogiri's downstream RPM package on a Linux distro such
as CentOS 10 Stream and RHEL 10.
However, we don't want to manage the depending rubyzip gem RPM package
in CentOS 10 Stream and RHEL 10. And we still want to pass the
nokogiri's unit tests on the environments.

This PR is still to pass the nokogiri's unit tests where rubyzip is not
maintained.

**Have you included adequate test coverage?**

This PR is just to make a test case optional. So, it doesn't affect the
test coverage.

**Does this change affect the behavior of either the C or the Java
implementations?**

No. This PR is just for a test, not for an implementation.
  • Loading branch information
flavorjones committed Apr 22, 2024
2 parents 42a1fc9 + 26e5ba5 commit c2daff1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/xml/test_document_encoding.rb
Expand Up @@ -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"?>
Expand Down

0 comments on commit c2daff1

Please sign in to comment.