diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-02-21 13:27:33 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-02-21 13:27:33 +0100 |
commit | 55f6bf57c8e769d0cedd7e4824f7c523ba81f604 (patch) | |
tree | 96610101c9b659736e7851f60b854316b9c1aaf7 | |
parent | 2393ca4783813e0a34132b277434713a008a7cc4 (diff) | |
download | bundler-stop_installing_plugins_after_install_for_path_gems.tar.gz |
Move spec to a better placestop_installing_plugins_after_install_for_path_gems
Since it tests all kinds of gems.
-rw-r--r-- | spec/install/gemfile/path_spec.rb | 35 | ||||
-rw-r--r-- | spec/install/gemfile_spec.rb | 37 |
2 files changed, 37 insertions, 35 deletions
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb index aec58234b0..ad9c49a9b9 100644 --- a/spec/install/gemfile/path_spec.rb +++ b/spec/install/gemfile/path_spec.rb @@ -712,40 +712,5 @@ RSpec.describe "bundle install with explicit source paths" do :requires => [lib_path("install_hooks.rb")] expect(err).to include("failed for foo-1.0") end - - it "does not load rubygems plugins after install" do - foo_file = home("foo_plugin_loaded") - bar_file = home("bar_plugin_loaded") - baz_file = home("baz_plugin_loaded") - expect(foo_file).not_to be_file - expect(bar_file).not_to be_file - expect(baz_file).not_to be_file - - build_repo4 do - build_lib "foo", "1.0", :path => lib_path("foo-1.0") do |s| - s.write("lib/rubygems_plugin.rb", "FileUtils.touch('#{foo_file}')") - end - - build_git "bar", "1.0", :path => lib_path("bar-1.0") do |s| - s.write("lib/rubygems_plugin.rb", "FileUtils.touch('#{bar_file}')") - end - - build_gem "baz" do |s| - s.write("lib/rubygems_plugin.rb", "FileUtils.touch('#{baz_file}')") - end - end - - install_gemfile! <<-G - source "#{file_uri_for(gem_repo4)}" - - gem "foo", :path => "#{lib_path("foo-1.0")}" - gem "bar", :path => "#{lib_path("bar-1.0")}" - gem "baz" - G - - expect(foo_file).not_to be_file - expect(bar_file).not_to be_file - expect(baz_file).not_to be_file - end end end diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb index e760f87ec1..40a490cee0 100644 --- a/spec/install/gemfile_spec.rb +++ b/spec/install/gemfile_spec.rb @@ -115,4 +115,41 @@ RSpec.describe "bundle install" do expect(out).to include("Bundle complete!") end end + + context "with rubygems plugins" do + it "does not load rubygems plugins after install" do + foo_file = home("foo_plugin_loaded") + bar_file = home("bar_plugin_loaded") + baz_file = home("baz_plugin_loaded") + expect(foo_file).not_to be_file + expect(bar_file).not_to be_file + expect(baz_file).not_to be_file + + build_repo4 do + build_lib "foo", "1.0", :path => lib_path("foo-1.0") do |s| + s.write("lib/rubygems_plugin.rb", "FileUtils.touch('#{foo_file}')") + end + + build_git "bar", "1.0", :path => lib_path("bar-1.0") do |s| + s.write("lib/rubygems_plugin.rb", "FileUtils.touch('#{bar_file}')") + end + + build_gem "baz" do |s| + s.write("lib/rubygems_plugin.rb", "FileUtils.touch('#{baz_file}')") + end + end + + install_gemfile! <<-G + source "#{file_uri_for(gem_repo4)}" + + gem "foo", :path => "#{lib_path("foo-1.0")}" + gem "bar", :path => "#{lib_path("bar-1.0")}" + gem "baz" + G + + expect(foo_file).not_to be_file + expect(bar_file).not_to be_file + expect(baz_file).not_to be_file + end + end end |