diff options
Diffstat (limited to 'spec/bundler/install/gemfile/git_spec.rb')
-rw-r--r-- | spec/bundler/install/gemfile/git_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index a70fb18c45..7850fad8d0 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -30,11 +30,15 @@ RSpec.describe "bundle install with git sources" do expect(Dir["#{default_bundle_path}/cache/bundler/git/foo-1.0-*"]).to have_attributes :size => 1 end - it "caches the git repo globally" do + it "caches the git repo globally and properly uses the cached repo on the next invocation" do simulate_new_machine bundle "config set global_gem_cache true" bundle :install expect(Dir["#{home}/.bundle/cache/git/foo-1.0-*"]).to have_attributes :size => 1 + + bundle "install --verbose" + expect(err).to be_empty + expect(out).to include("Using foo 1.0 from #{lib_path("foo")}") end it "caches the evaluated gemspec" do @@ -83,7 +87,7 @@ RSpec.describe "bundle install with git sources" do gem "foo", "1.1", :git => "#{lib_path("foo-1.0")}" G - expect(err).to include("The source contains 'foo' at: 1.0") + expect(err).to include("The source contains the following versions of 'foo': 1.0") end it "complains with version and platform if pinned specs don't exist in the git repo" do @@ -99,7 +103,7 @@ RSpec.describe "bundle install with git sources" do end G - expect(err).to include("The source contains 'only_java' at: 1.0 java") + expect(err).to include("The source contains the following versions of 'only_java': 1.0 java") end it "complains with multiple versions and platforms if pinned specs don't exist in the git repo" do @@ -120,7 +124,7 @@ RSpec.describe "bundle install with git sources" do end G - expect(err).to include("The source contains 'only_java' at: 1.0 java, 1.1 java") + expect(err).to include("The source contains the following versions of 'only_java': 1.0 java, 1.1 java") end it "still works after moving the application directory" do @@ -933,8 +937,6 @@ RSpec.describe "bundle install with git sources" do end it "prints a friendly error if a file blocks the git repo" do - skip "drive letter is not detected correctly in error message" if Gem.win_platform? - build_git "foo" FileUtils.mkdir_p(default_bundle_path) |