summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorIan Ker-Seymer <ian.kerseymer@shopify.com>2024-05-30 23:03:08 -0400
committergit <svn-admin@ruby-lang.org>2026-02-13 06:28:13 +0000
commite785e466daab8c85d8e6cdfb05fa43c488e74db2 (patch)
tree634953ceb41ffd5fbf83fc617badd4bdd6044f25 /spec
parentc0d4f3e92dbfd7744b12c1f0fbb11fcee3ef1313 (diff)
[ruby/rubygems] Improve testing config
https://github.com/ruby/rubygems/commit/92e28403c3
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/newgem_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index c078ed84aa..754dd3f31f 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -1736,10 +1736,8 @@ RSpec.describe "bundle gem" do
expect(bundled_app("#{gem_name}/ext/#{gem_name}/build.rs")).to exist
end
- it "includes rake-compiler, rb_sys gems and required_rubygems_version constraint" do
+ it "includes rake-compiler constraint" do
expect(bundled_app("#{gem_name}/Gemfile").read).to include('gem "rake-compiler"')
- expect(bundled_app("#{gem_name}/#{gem_name}.gemspec").read).to include('spec.add_dependency "rb_sys"')
- expect(bundled_app("#{gem_name}/#{gem_name}.gemspec").read).to include('spec.required_rubygems_version = ">= ')
end
it "depends on compile task for build" do
@@ -1782,6 +1780,8 @@ RSpec.describe "bundle gem" do
system(env, "cargo", "-V", out: IO::NULL, err: [:child, :out])
skip "cargo not present" unless $?.success?
+ # Hermetic Cargo setup
+ RbConfig::CONFIG.each {|k, v| env["RBCONFIG_#{k}"] = v }
env
end
end