summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Ker-Seymer <ian.kerseymer@shopify.com>2024-05-30 23:30:19 -0400
committergit <svn-admin@ruby-lang.org>2026-02-13 06:28:14 +0000
commitfe25c2cbacf66dfd75790042b02d2bde51092936 (patch)
tree660d846f65a0bd23dc02f529c2f3bab65a2ed535
parent211c17dcac82fec630bd6e57d362abbf6f281eae (diff)
[ruby/rubygems] Remove hard coded constant
https://github.com/ruby/rubygems/commit/da14b90859
-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 6552c4addd..dd39342f78 100644
--- a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
+++ b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
@@ -7,7 +7,7 @@ RSpec.describe <%= config[:constant_name] %> do
<%- if config[:ext] == 'rust' -%>
it "can call into Rust" do
- result = Testing.hello("world")
+ result = <%= config[:constant_name] %>.hello("world")
expect(result).to be("Hello earth, from Rust!")
end
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 3c7d8b096e..9a859fa4d1 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!", Testing.hello("world")
+ assert_equal "Hello earth, from Rust!", <%= config[:constant_name] %>.hello("world")
end
<%- else -%>
def test_it_does_something_useful