summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2024-07-17 22:11:06 +0200
committergit <[email protected]>2024-07-18 09:25:17 +0000
commit86c99a8d14daa15b1b5f6c99697630aa3abb7d5d (patch)
tree82a2feab9ca9086c8e5e333b5242193e268fd169 /test
parent95728a8b4208bb9a3427cde95a4ceba76e349b39 (diff)
[rubygems/rubygems] Fix gemspec `require_paths` type validation
It was not properly being detected as an Array attribute, and thus not properly validated. Fixing this allows us to remove a strange `rescue` clause in Bundler. https://github.com/rubygems/rubygems/commit/4121a32408
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_specification.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 71b2f1ca67..0a67dad25d 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -2989,6 +2989,18 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
e.message
end
+ def test_validate_require_paths_with_invalid_types
+ util_setup_validate
+
+ @a1.require_paths = [1, 2]
+ e = assert_raise Gem::InvalidSpecificationException do
+ @a1.validate
+ end
+
+ assert_equal "require_paths must be an Array of String",
+ e.message
+ end
+
def test_validate_files
pend "test_validate_files skipped on MS Windows (symlink)" if Gem.win_platform?
util_setup_validate