Skip to content

Commit f5ad01e

Browse files
hsbtclaude
authored andcommitted
[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. ruby/rubygems@8de4c041ba Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 42b74bd commit f5ad01e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/bundler/templates/newgem/spec/newgem_spec.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RSpec.describe <%= config[:constant_name] %> do
99
it "can call into Rust" do
1010
result = <%= config[:constant_name] %>.hello("world")
1111

12-
expect(result).to be("Hello earth, from Rust!")
12+
expect(result).to be("Hello world, from Rust!")
1313
end
1414
<%- else -%>
1515
it "does something useful" do

lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class <%= config[:minitest_constant_name] %> < Minitest::Test
99

1010
<%- if config[:ext] == 'rust' -%>
1111
def test_hello_world
12-
assert_equal "Hello earth, from Rust!", <%= config[:constant_name] %>.hello("world")
12+
assert_equal "Hello world, from Rust!", <%= config[:constant_name] %>.hello("world")
1313
end
1414
<%- else -%>
1515
def test_it_does_something_useful

0 commit comments

Comments
 (0)