diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-01-29 01:26:51 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-01-29 01:27:17 +0900 |
commit | 534536c7cc69970fead43df048d55efe518a03f3 (patch) | |
tree | 6b7401bb456b2bf2ec3dab78b5094185b372e9b6 /test | |
parent | 650f152d2f5ed929c76cd7e7cf17270e53ac346c (diff) |
fix test cleanup.
should remove pathname.
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_exception.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 086f250a3b..9d7ffd8825 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -974,10 +974,12 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| t.puts "require '#{basename}'" t.close $LOAD_PATH.push(File.dirname(t)) - warning = capture_warning_warn {require basename} + warning = capture_warning_warn { + assert require(basename) + } ensure $LOAD_PATH.pop - $LOADED_FEATURES.delete(t) + $LOADED_FEATURES.delete(t.path) end assert_equal(1, warning.size) assert_match(/circular require/, warning.first) |