diff options
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)}" |