mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Simplify #warn test to not rely on the effect of -C on -I
https://github.com/rubygems/rubygems/commit/382642a0d4
This commit is contained in:
parent
b9d431a7b1
commit
5c1957e95c
Notes:
git
2020-06-05 07:33:40 +09:00
1 changed files with 2 additions and 2 deletions
|
@ -562,11 +562,11 @@ class TestGemRequire < Gem::TestCase
|
|||
File.write(dir + "/sub.rb", "#{prefix}warn 'uplevel', 'test', uplevel: 1\n")
|
||||
File.write(dir + "/main.rb", "require 'sub'\n")
|
||||
_, err = capture_subprocess_io do
|
||||
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "-I.", "main.rb")
|
||||
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "-I", dir, "main.rb")
|
||||
end
|
||||
assert_match(/main\.rb:1: warning: uplevel\ntest\n$/, err)
|
||||
_, err = capture_subprocess_io do
|
||||
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "-I.", "main.rb")
|
||||
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "-I", dir, "main.rb")
|
||||
end
|
||||
assert_match(/main\.rb:1: warning: uplevel\ntest\n$/, err)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue