Skip to content

Commit 1498c62

Browse files
committed
🐛 Fix JRuby env override spec
1 parent 00c2ac7 commit 1498c62

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Please file a bug if you notice a violation of semantic versioning.
3333

3434
### Fixed
3535

36+
- Made the ENV-driven configuration spec explicitly remove nil-valued child
37+
process overrides so JRuby 9.2 does not inherit `KETTLE_TEST_SILENT=false`.
38+
3639
### Security
3740

3841
## [2.0.2] - 2026-06-01

spec/kettle/test_spec.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
include_context "with stubbed env"
1111

1212
def isolated_kettle_test_snapshot(env = {})
13+
child_env = ENV.to_hash
14+
env.each do |key, value|
15+
if value.nil?
16+
child_env.delete(key)
17+
else
18+
child_env[key] = value
19+
end
20+
end
21+
1322
code = <<~RUBY
1423
require "bundler/setup"
1524
require "json"
@@ -30,7 +39,7 @@ def isolated_kettle_test_snapshot(env = {})
3039
RUBY
3140

3241
stdout, stderr, status = Open3.capture3(
33-
env,
42+
child_env,
3443
RbConfig.ruby,
3544
"-e",
3645
code,

0 commit comments

Comments
 (0)