1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Prevent a warning "Expected ... to define AutoloadTest but it didn't"

related: [Bugs #18813] and eca31d24d6
This commit is contained in:
Yusuke Endoh 2022-06-20 17:39:58 +09:00
parent 8d689294d0
commit 078db98da4

View file

@ -150,6 +150,7 @@ p Foo::Bar
end end
def test_nameerror_when_autoload_did_not_define_the_constant def test_nameerror_when_autoload_did_not_define_the_constant
verbose_bak, $VERBOSE = $VERBOSE, nil
Tempfile.create(['autoload', '.rb']) {|file| Tempfile.create(['autoload', '.rb']) {|file|
file.puts '' file.puts ''
file.close file.close
@ -162,6 +163,8 @@ p Foo::Bar
remove_autoload_constant remove_autoload_constant
end end
} }
ensure
$VERBOSE = verbose_bak
end end
def test_override_autoload def test_override_autoload