summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2026-04-08 13:26:05 +0900
committergit <svn-admin@ruby-lang.org>2026-04-08 05:39:58 +0000
commitf5ad01ea9731560f6c3bc5ad339533460cf92958 (patch)
treeb336ba637c621696f99d28f4df62ea3e6e18ae82
parent42b74bdb2058217859b665b842460dee18879654 (diff)
[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) <noreply@anthropic.com>
-rw-r--r--lib/bundler/templates/newgem/spec/newgem_spec.rb.tt2
-rw-r--r--lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt2
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