Skip to content

Commit

Permalink
Add failing test for #270068
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Claudius authored and segiddins committed Feb 16, 2018
1 parent f2f491b commit efcaafe
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/rubygems/test_gem_package.rb
Expand Up @@ -566,6 +566,21 @@ def test_install_location_relative
"#{@destination} is not allowed", e.message)
end

def test_install_location_suffix
package = Gem::Package.new @gem

filename = "../#{File.basename(@destination)}suffix.rb"

e = assert_raises Gem::Package::PathError do
package.install_location filename, @destination
end

parent = File.expand_path File.join @destination, filename

assert_equal("installing into parent path #{parent} of " +
"#{@destination} is not allowed", e.message)
end

def test_load_spec
entry = StringIO.new Gem.gzip @spec.to_yaml
def entry.full_name() 'metadata.gz' end
Expand Down

0 comments on commit efcaafe

Please sign in to comment.