diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-08 16:36:29 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-08 17:30:02 +0900 |
commit | 473f9d2df0ddd7fdb5cc73fa3ad49b2f19f22b06 (patch) | |
tree | 6b39312502d32474da0157f5d55620fabd6454ea /spec/bundler/commands/install_spec.rb | |
parent | 4aca77edde91f826aa243e268bf1ef5214530583 (diff) |
Merge prepare version of Bundler 2.2.0
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3864
Diffstat (limited to 'spec/bundler/commands/install_spec.rb')
-rw-r--r-- | spec/bundler/commands/install_spec.rb | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index d1b8585114..a8b174a547 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -141,8 +141,14 @@ RSpec.describe "bundle install with gem sources" do end it "does not install the development dependency" do + build_repo2 do + build_gem "with_development_dependency" do |s| + s.add_development_dependency "activesupport", "= 2.3.5" + end + end + install_gemfile <<-G - source "#{file_uri_for(gem_repo1)}" + source "#{file_uri_for(gem_repo2)}" gem "with_development_dependency" G @@ -216,6 +222,18 @@ RSpec.describe "bundle install with gem sources" do expect(the_bundle).to include_gems "rack 1.0.0", "activesupport 2.3.5" end + it "loads env plugins" do + plugin_msg = "hello from an env plugin!" + create_file "plugins/rubygems_plugin.rb", "puts '#{plugin_msg}'" + rubylib = ENV["RUBYLIB"].to_s.split(File::PATH_SEPARATOR).unshift(bundled_app("plugins").to_s).join(File::PATH_SEPARATOR) + install_gemfile <<-G, :env => { "RUBYLIB" => rubylib } + source "#{file_uri_for(gem_repo1)}" + gem "rack" + G + + expect(last_command.stdboth).to include(plugin_msg) + end + describe "with a gem that installs multiple platforms" do it "installs gems for the local platform as first choice" do skip "version is 1.0, not 1.0.0" if Gem.win_platform? @@ -294,8 +312,11 @@ RSpec.describe "bundle install with gem sources" do end it "finds gems in multiple sources", :bundler => "< 3" do - build_repo2 - update_repo2 + build_repo2 do + build_gem "rack", "1.2" do |s| + s.executables = "rackup" + end + end install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" |