public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/rubygem-cucumber-wire] rawhide: Fix test suite compatiblity with Cucumber 11+
Date: Mon, 24 Aug 2026 18:20:16 GMT [thread overview]
Message-ID: <178759561626.1.10693554996092384517.rpms-rubygem-cucumber-wire-72e4de27e840@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rubygem-cucumber-wire
Branch : rawhide
Commit : 72e4de27e840c50ae747dd5e8de456655ccc8f85
Author : Vít Ondruch <vondruch@redhat.com>
Date : 2026-08-24T16:08:27+02:00
Stats : +76/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rubygem-cucumber-wire/c/72e4de27e840c50ae747dd5e8de456655ccc8f85?branch=rawhide
Log:
Fix test suite compatiblity with Cucumber 11+
---
diff --git a/rubygem-cucumber-wire-8.0.0-Fix-test-suite-compatibility-with-Cucumber-11-x.patch b/rubygem-cucumber-wire-8.0.0-Fix-test-suite-compatibility-with-Cucumber-11-x.patch
new file mode 100644
index 0000000..f6cbe1a
--- /dev/null
+++ b/rubygem-cucumber-wire-8.0.0-Fix-test-suite-compatibility-with-Cucumber-11-x.patch
@@ -0,0 +1,58 @@
+From 267ec387f485ce4ab3ba5402a58dedbf8495cba5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
+Date: Mon, 24 Aug 2026 15:21:34 +0200
+Subject: [PATCH] Fix test suite compatibility with cucumber 11.x
+
+Commit a1701d55f added `output_snippet_envelope` to `MessageBuilder`,
+which unconditionally sends a `snippet_text` request over the wire
+protocol whenever a step result is undefined, even during `--dry-run
+--no-snippets` runs. This bypasses the `--no-snippets` guard that only
+affects console formatters, because MessageBuilder is now always
+instantiated regardless of the selected formatter.
+
+Let FakeWireServer to silently return a neutral success response
+for messages that Cucumber may send unconditionally but that individual
+scenarios have no reason to handle.
+
+Assisted-by: Claude Sonnet 4.6
+---
+ features/support/fake_wire_server.rb | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/features/support/fake_wire_server.rb b/features/support/fake_wire_server.rb
+index a7a3c49..1bba389 100644
+--- a/features/support/fake_wire_server.rb
++++ b/features/support/fake_wire_server.rb
+@@ -35,6 +35,13 @@ class FakeWireServer
+ end
+
+ class SocketSession
++ # Some messages may be sent by Cucumber unconditionally (e.g.
++ # `snippet_text` is sent by Cucumber 11.x MessageBuilder on every undefined
++ # step, regardless of `--no-snippets` or `--dry-run`). Return a neutral
++ # success response so that individual scenarios do not need to enumerate
++ # these in their protocol tables.
++ IGNORABLE_MESSAGES = %w[snippet_text].freeze
++
+ def initialize(socket, protocol, delays, on_message)
+ @socket = socket
+ @protocol = protocol
+@@ -55,6 +62,8 @@ class FakeWireServer
+ sleep delay(data)
+ @on_message.call(JSON.parse(protocol_entry['request'])[0])
+ send_response(protocol_entry['response'])
++ elsif ignorable?(data.strip)
++ send_response(['success', ''].to_json)
+ else
+ serialized_exception = { message: "Not understood: #{data}", backtrace: [] }
+ send_response(['fail', serialized_exception].to_json)
+@@ -77,5 +86,9 @@ class FakeWireServer
+ message = JSON.parse(data.strip)[0]
+ @delays[message.to_sym] || 0
+ end
++
++ def ignorable?(data)
++ IGNORABLE_MESSAGES.include?(JSON.parse(data)[0])
++ end
+ end
+ end
diff --git a/rubygem-cucumber-wire.spec b/rubygem-cucumber-wire.spec
index 892a2d1..a2f3443 100644
--- a/rubygem-cucumber-wire.spec
+++ b/rubygem-cucumber-wire.spec
@@ -5,7 +5,7 @@
Name: rubygem-%{gem_name}
Version: 8.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Wire protocol for Cucumber
License: MIT
URL: http://cucumber.io
@@ -13,6 +13,16 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/cucumber/cucumber-ruby-wire.git && cd cucumber-ruby-wire
# git archive -v -o rubygem-cucumber-wire-8.0.0-features.tar.gz v8.0.0 features/ spec/
Source1: %{name}-%{version}-features.tar.gz
+# Fix test suite compatiblity with Cucumber 11+
+# This prevents errors such as:
+# ~~~
+# Expected `cucumber --dry-run --no-snippets -f progress --publish-quiet` to succeed but got non-zero exit status and the following output:
+#
+# UNot understood: ["snippet_text",{"step_keyword":"Given","step_name":"we're all wired","multiline_arg_class":""}]
+# (Cucumber::Wire::Exception)
+# ~~~
+# https://github.com/cucumber/cucumber-ruby-wire/pull/107
+Patch0: rubygem-cucumber-wire-8.0.0-Fix-test-suite-compatibility-with-Cucumber-11-x.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
@@ -39,6 +49,10 @@ Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b1
+( cd %{builddir}
+%patch 0 -p1
+)
+
# Relax the dependency.
%gemspec_remove_dep -g cucumber-core "> 11", "< 16"
%gemspec_add_dep -g cucumber-core
@@ -88,6 +102,9 @@ RUBYOPT="-I$(pwd)/lib" cucumber --format progress --publish-quiet
%doc %{gem_instdir}/README.md
%changelog
+* Mon Aug 24 2026 Vít Ondruch <vondruch@redhat.com> - 8.0.0-2
+- Fix test suite compatiblity with Cucumber 11+
+
* Thu Aug 06 2026 Vít Ondruch <vondruch@redhat.com> - 8.0.0-1
- Upgrade to cucumber-wire 8.0.0.
Resolves: rhbz#1867935
reply other threads:[~2026-08-24 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178759561626.1.10693554996092384517.rpms-rubygem-cucumber-wire-72e4de27e840@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox