mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
fix test cleanup.
should remove pathname.
This commit is contained in:
parent
650f152d2f
commit
534536c7cc
1 changed files with 4 additions and 2 deletions
|
@ -974,10 +974,12 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
|
||||||
t.puts "require '#{basename}'"
|
t.puts "require '#{basename}'"
|
||||||
t.close
|
t.close
|
||||||
$LOAD_PATH.push(File.dirname(t))
|
$LOAD_PATH.push(File.dirname(t))
|
||||||
warning = capture_warning_warn {require basename}
|
warning = capture_warning_warn {
|
||||||
|
assert require(basename)
|
||||||
|
}
|
||||||
ensure
|
ensure
|
||||||
$LOAD_PATH.pop
|
$LOAD_PATH.pop
|
||||||
$LOADED_FEATURES.delete(t)
|
$LOADED_FEATURES.delete(t.path)
|
||||||
end
|
end
|
||||||
assert_equal(1, warning.size)
|
assert_equal(1, warning.size)
|
||||||
assert_match(/circular require/, warning.first)
|
assert_match(/circular require/, warning.first)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue