aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/install/git_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/install/git_spec.rb')
-rw-r--r--spec/bundler/install/git_spec.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/spec/bundler/install/git_spec.rb b/spec/bundler/install/git_spec.rb
index 04f2380b45..6ae718c2a4 100644
--- a/spec/bundler/install/git_spec.rb
+++ b/spec/bundler/install/git_spec.rb
@@ -1,21 +1,20 @@
# frozen_string_literal: true
-require "spec_helper"
RSpec.describe "bundle install" do
context "git sources" do
- it "displays the revision hash of the gem repository" do
+ it "displays the revision hash of the gem repository", :bundler => "< 2" do
build_git "foo", "1.0", :path => lib_path("foo")
install_gemfile <<-G
gem "foo", :git => "#{lib_path("foo")}"
G
- bundle :install
+ bundle! :install
expect(out).to include("Using foo 1.0 from #{lib_path("foo")} (at master@#{revision_for(lib_path("foo"))[0..6]})")
expect(the_bundle).to include_gems "foo 1.0", :source => "git@#{lib_path("foo")}"
end
- it "displays the ref of the gem repository when using branch~num as a ref" do
+ it "displays the ref of the gem repository when using branch~num as a ref", :bundler => "< 2" do
build_git "foo", "1.0", :path => lib_path("foo")
rev = revision_for(lib_path("foo"))[0..6]
update_git "foo", "2.0", :path => lib_path("foo"), :gemspec => true
@@ -32,13 +31,13 @@ RSpec.describe "bundle install" do
update_git "foo", "4.0", :path => lib_path("foo"), :gemspec => true
- bundle! :update
+ bundle! :update, :all => bundle_update_requires_all?
expect(out).to include("Using foo 2.0 (was 1.0) from #{lib_path("foo")} (at master~2@#{rev2})")
expect(the_bundle).to include_gems "foo 2.0", :source => "git@#{lib_path("foo")}"
end
- it "should check out git repos that are missing but not being installed" do
- build_git "foo"
+ it "should allows git repos that are missing but not being installed" do
+ revision = build_git("foo").ref_for("HEAD")
gemfile <<-G
gem "foo", :git => "file://#{lib_path("foo-1.0")}", :group => :development
@@ -47,6 +46,7 @@ RSpec.describe "bundle install" do
lockfile <<-L
GIT
remote: file://#{lib_path("foo-1.0")}
+ revision: #{revision}
specs:
foo (1.0)
@@ -57,10 +57,9 @@ RSpec.describe "bundle install" do
foo!
L
- bundle "install --path=vendor/bundle --without development"
+ bundle! :install, forgotten_command_line_options(:path => "vendor/bundle", :without => "development")
expect(out).to include("Bundle complete!")
- expect(vendored_gems("bundler/gems/foo-1.0-#{revision_for(lib_path("foo-1.0"))[0..11]}")).to be_directory
end
end
end