From dfe59a99f40c2f133ab0d3744d090de842c52f57 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 1 Nov 2017 23:29:38 +0000 Subject: Update bundled bundler to 1.16.0. * lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/bundler/install/gemfile/eval_gemfile_spec.rb | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'spec/bundler/install/gemfile/eval_gemfile_spec.rb') diff --git a/spec/bundler/install/gemfile/eval_gemfile_spec.rb b/spec/bundler/install/gemfile/eval_gemfile_spec.rb index f02223d34d..035d3692aa 100644 --- a/spec/bundler/install/gemfile/eval_gemfile_spec.rb +++ b/spec/bundler/install/gemfile/eval_gemfile_spec.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require "spec_helper" RSpec.describe "bundle install with gemfile that uses eval_gemfile" do before do @@ -21,8 +20,9 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do eval_gemfile 'Gemfile-other' G expect(out).to include("Resolving dependencies") - expect(out).to include("Using gunks 0.0.1 from source at `gems/gunks`") expect(out).to include("Bundle complete") + + expect(the_bundle).to include_gem "gunks 0.0.1", :source => "path@#{bundled_app("gems", "gunks")}" end end @@ -47,7 +47,7 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do # parsed lockfile and the evaluated gemfile. it "bundles with --deployment" do bundle! :install - bundle! "install --deployment" + bundle! :install, forgotten_command_line_options(:deployment => true) end end @@ -60,8 +60,23 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do gemspec :path => 'gems/gunks' G expect(out).to include("Resolving dependencies") - expect(out).to include("Using gunks 0.0.1 from source at `gems/gunks`") expect(out).to include("Bundle complete") + + expect(the_bundle).to include_gem "gunks 0.0.1", :source => "path@#{bundled_app("gems", "gunks")}" + end + end + + context "eval-ed Gemfile references other gemfiles" do + it "works with relative paths" do + create_file "other/Gemfile-other", "gem 'rack'" + create_file "other/Gemfile", "eval_gemfile 'Gemfile-other'" + create_file "Gemfile-alt", <<-G + source "file:#{gem_repo1}" + eval_gemfile "other/Gemfile" + G + install_gemfile! "eval_gemfile File.expand_path('Gemfile-alt')" + + expect(the_bundle).to include_gem "rack 1.0.0" end end end -- cgit v1.2.3