diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-10-07 12:44:13 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-10-07 13:21:24 +0900 |
| commit | 4cdf5f493362df1261ecc87f9644f2b0c2f2a409 (patch) | |
| tree | edc34f3fa38725e4912d4bf36149a21e66e8e583 /tool/lib | |
| parent | 03f714de626cad7c8c45a60bffad2ce66228b524 (diff) | |
Verify that RubyGems is enabled by default
Diffstat (limited to 'tool/lib')
| -rw-r--r-- | tool/lib/core_assertions.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 47cc6574c8..934ab08037 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -97,9 +97,11 @@ module Test end def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil, - success: nil, failed: nil, **opt) + success: nil, failed: nil, gems: false, **opt) args = Array(args).dup - args.insert((Hash === args[0] ? 1 : 0), '--disable=gems') + unless gems.nil? + args.insert((Hash === args[0] ? 1 : 0), "--#{gems ? 'enable' : 'disable'}=gems") + end stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, **opt) desc = failed[status, message, stderr] if failed desc ||= FailDesc[status, message, stderr] |
