Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created July 5, 2011 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tenderlove/1065473 to your computer and use it in GitHub Desktop.
Save tenderlove/1065473 to your computer and use it in GitHub Desktop.
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 3c6d942..1ac5c06 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -2186,11 +2186,6 @@ class Gem::Specification
"invalid value for attribute name: \"#{name.inspect}\""
end
- if require_paths.empty? then
- raise Gem::InvalidSpecificationException,
- 'specification must have at least one require_path'
- end
-
@files.delete_if { |x| File.directory?(x) }
@test_files.delete_if { |x| File.directory?(x) }
@executables.delete_if { |x| File.directory?(File.join(@bindir, x)) }
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 5e4609e..ab51e1d 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1146,22 +1146,6 @@ end
assert_equal "#{w}: bin/exec is missing #! line\n", @ui.error, 'error'
end
- def test_validate_empty_require_paths
- if win_platform? then
- skip 'test_validate_empty_require_paths skipped on MS Windows (symlink)'
- else
- util_setup_validate
-
- @a1.require_paths = []
- e = assert_raises Gem::InvalidSpecificationException do
- @a1.validate
- end
-
- assert_equal 'specification must have at least one require_path',
- e.message
- end
- end
-
def test_validate_files
skip 'test_validate_files skipped on MS Windows (symlink)' if win_platform?
util_setup_validate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment