diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-15 14:40:07 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-15 14:40:07 +0000 |
commit | f033cfa3816e0138906aeaf8adcd3c18a623d16a (patch) | |
tree | 008c124bfab93b99a25826f7298d8f3c89ff0525 /lib/rubygems.rb | |
parent | 52c738408e7624d1f6ebb8c62a7497fed2684bf5 (diff) |
refresh Gem at the end of `teardown`.
* lib/rubygems/test_case.rb (teardown): call `Gem::refresh()` at the
end of `teardown`.
On parallel test sometimes fails test process. The reason
is:
(1) previous tests remains `Gem::Specification@@stubs` value
which points to temporary directories and the directories
are removed by `teardown` method of previous test.
(2) `require 'rubygems/gem_runner'` in `test_gem_gem_runner.rb`
tries to require test utility file. However, with strange `@@stubs`
RubyGems tries to load specification from removed directory.
`StubSpecification#to_spec` returns `nil` and error will occur.
The solution this patch employs is to refresh all of parameters
includes `Gem::Specification@@stubs` by `Gem::refresh()`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
0 files changed, 0 insertions, 0 deletions