diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-10-20 14:36:52 -0500 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:57 +0900 |
commit | 82bf064375361f3d662389a634ef0541a0a1fc3b (patch) | |
tree | 97b65ac43cd7a06c74ee674ce3ae163bc9aee691 /spec/bundler/commands | |
parent | 215d846ea59ef0a20558ac7056f35998e9dc053e (diff) | |
download | ruby-82bf064375361f3d662389a634ef0541a0a1fc3b.tar.gz |
[bundler/bundler] [Package] Ensure uninstallable gems are _never_ installed
https://github.com/bundler/bundler/commit/899aeeebb0
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r-- | spec/bundler/commands/package_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/bundler/commands/package_spec.rb b/spec/bundler/commands/package_spec.rb index c22569171a..e051743fd0 100644 --- a/spec/bundler/commands/package_spec.rb +++ b/spec/bundler/commands/package_spec.rb @@ -205,22 +205,32 @@ RSpec.describe "bundle package" do end it "does not attempt to install gems in without groups" do + build_repo4 do + build_gem "uninstallable", "2.0" do |s| + s.add_development_dependency "rake" + s.extensions << "Rakefile" + s.write "Rakefile", "task(:default) { raise 'CANNOT INSTALL' }" + end + end + install_gemfile! <<-G, forgotten_command_line_options(:without => "wo") source "file:#{gem_repo1}" gem "rack" group :wo do gem "weakling" + gem "uninstallable", :source => "file:#{gem_repo4}" end G bundle! :package, "all-platforms" => true expect(bundled_app("vendor/cache/weakling-0.0.3.gem")).to exist + expect(bundled_app("vendor/cache/uninstallable-2.0.gem")).to exist expect(the_bundle).to include_gem "rack 1.0" - expect(the_bundle).not_to include_gem "weakling" + expect(the_bundle).not_to include_gems "weakling", "uninstallable" bundle! :install, forgotten_command_line_options(:without => "wo") expect(the_bundle).to include_gem "rack 1.0" - expect(the_bundle).not_to include_gem "weakling" + expect(the_bundle).not_to include_gems "weakling", "uninstallable" end end |