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