Bug #4686
closedtest/rubygems/test_gem_package_tar_output.rb should require rubygems/security
Description
Hi,
When run test-all with parallel option ("-j"), test_self_open_signed(TestGemPackageTarOutput)
can be failed.
- Error:
test_self_open_signed(TestGemPackageTarOutput):
NameError: uninitialized constant Gem::Security
/Users/sorah/git/ruby/ruby/test/rubygems/test_gem_package_tar_output.rb:61:in `test_self_open_signed'
Because if running test-all with -j, the running order of test files can be not equal to the order when running test-all without -j.
So, if the test expects that already 'openssl' or 'rubygem/security' is required before that test runs,
we should fix to require 'rubygem/security' on the top of the test file.
--
Patch is below:
diff --git a/test/rubygems/test_gem_package_tar_output.rb b/test/rubygems/test_gem_package_tar_output.rb
index 77f3185..01b4a0f 100644
--- a/test/rubygems/test_gem_package_tar_output.rb
+++ b/test/rubygems/test_gem_package_tar_output.rb
@@ -6,6 +6,7 @@
require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_output'
+require 'rubygems/security'
class TestGemPackageTarOutput < Gem::Package::TarTestCase
Updated by drbrain (Eric Hodel) almost 14 years ago
- Status changed from Open to Closed
This has been committed to rubygems trunk, thank you!