diff options
Diffstat (limited to 'spec/bundler/install/git_spec.rb')
-rw-r--r-- | spec/bundler/install/git_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/bundler/install/git_spec.rb b/spec/bundler/install/git_spec.rb index cc8bf70b03..1b32991fa8 100644 --- a/spec/bundler/install/git_spec.rb +++ b/spec/bundler/install/git_spec.rb @@ -5,16 +5,17 @@ RSpec.describe "bundle install" do it "displays the revision hash of the gem repository", :bundler => "< 3" do build_git "foo", "1.0", :path => lib_path("foo") - install_gemfile <<-G - gem "foo", :git => "#{lib_path("foo")}" + install_gemfile! <<-G + gem "foo", :git => "#{file_uri_for(lib_path("foo"))}" G - bundle! :install - expect(out).to include("Using foo 1.0 from #{lib_path("foo")} (at master@#{revision_for(lib_path("foo"))[0..6]})") + expect(out).to include("Using foo 1.0 from #{file_uri_for(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", :bundler => "< 3" do + skip "maybe branch~num notation doesn't work on Windows' git" if Gem.win_platform? + 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 @@ -22,17 +23,16 @@ RSpec.describe "bundle install" do update_git "foo", "3.0", :path => lib_path("foo"), :gemspec => true install_gemfile! <<-G - gem "foo", :git => "#{lib_path("foo")}", :ref => "master~2" + gem "foo", :git => "#{file_uri_for(lib_path("foo"))}", :ref => "master~2" G - bundle! :install - expect(out).to include("Using foo 1.0 from #{lib_path("foo")} (at master~2@#{rev})") + expect(out).to include("Using foo 1.0 from #{file_uri_for(lib_path("foo"))} (at master~2@#{rev})") expect(the_bundle).to include_gems "foo 1.0", :source => "git@#{lib_path("foo")}" update_git "foo", "4.0", :path => lib_path("foo"), :gemspec => true bundle! :update, :all => true - expect(out).to include("Using foo 2.0 (was 1.0) from #{lib_path("foo")} (at master~2@#{rev2})") + expect(out).to include("Using foo 2.0 (was 1.0) from #{file_uri_for(lib_path("foo"))} (at master~2@#{rev2})") expect(the_bundle).to include_gems "foo 2.0", :source => "git@#{lib_path("foo")}" end @@ -69,10 +69,10 @@ RSpec.describe "bundle install" do build_git "gems", :path => lib_path("gems"), :gemspec => false end - install_gemfile <<-G + install_gemfile! <<-G source "#{file_uri_for(gem_repo2)}" - gem "foo", :git => "#{lib_path("gems")}", :glob => "foo/*.gemspec" - gem "zebra", :git => "#{lib_path("gems")}", :glob => "zebra/*.gemspec" + gem "foo", :git => "#{file_uri_for(lib_path("gems"))}", :glob => "foo/*.gemspec" + gem "zebra", :git => "#{file_uri_for(lib_path("gems"))}", :glob => "zebra/*.gemspec" G bundle "info foo" |