From f5ad01ea9731560f6c3bc5ad339533460cf92958 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 8 Apr 2026 13:26:05 +0900 Subject: [ruby/rubygems] Fix wrong expected value in Rust extension test templates The Rust function hello("world") returns "Hello world, from Rust!" but the Ruby test templates expected "Hello earth, from Rust!", causing generated tests to fail immediately after bundle gem --ext=rust. https://github.com/ruby/rubygems/commit/8de4c041ba Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/bundler/templates/newgem/spec/newgem_spec.rb.tt | 2 +- lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt index dd39342f78..323951e55b 100644 --- a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +++ b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt @@ -9,7 +9,7 @@ RSpec.describe <%= config[:constant_name] %> do it "can call into Rust" do result = <%= config[:constant_name] %>.hello("world") - expect(result).to be("Hello earth, from Rust!") + expect(result).to be("Hello world, from Rust!") end <%- else -%> it "does something useful" do diff --git a/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt b/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt index 9a859fa4d1..844d3aff81 100644 --- a/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +++ b/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt @@ -9,7 +9,7 @@ class <%= config[:minitest_constant_name] %> < Minitest::Test <%- if config[:ext] == 'rust' -%> def test_hello_world - assert_equal "Hello earth, from Rust!", <%= config[:constant_name] %>.hello("world") + assert_equal "Hello world, from Rust!", <%= config[:constant_name] %>.hello("world") end <%- else -%> def test_it_does_something_useful -- cgit v1.2.3