diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index 85d1d290436..1cb278e9123 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -220,5 +220,22 @@ gemspec = bundled_app("vendor/cache/foo-1.0-#{ref}/foo.gemspec").read expect(gemspec).to_not match("`echo bob`") end + + it "can install after #{cmd} with git not installed" do + build_git "foo" + + gemfile <<-G + gem "foo", :git => '#{lib_path("foo-1.0")}' + G + bundle! "config set cache_all true" + bundle! cmd, "all-platforms" => true, :install => false, :path => "./vendor/cache" + + simulate_new_machine + with_path_as "" do + bundle! "config set deployment true" + bundle! :install, :local => true + expect(the_bundle).to include_gem "foo 1.0" + end + end end end