diff options
Diffstat (limited to 'spec/cache/git_spec.rb')
-rw-r--r-- | spec/cache/git_spec.rb | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index 8c9055e77a..551af77365 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -1,8 +1,40 @@ require "spec_helper" -describe "bundle cache with git" do - it "base_name should strip private repo uris" do - source = Bundler::Source::Git.new("uri" => "git@github.com:bundler.git") - source.send(:base_name).should == "bundler" +describe "bundle cache" do + describe "with git sources" do + it "is silent when the path is within the bundle" do + build_git "foo", :path => "file://#{lib_path('foo')}/.git" + + install_gemfile <<-G + gem "foo", :git => "file://#{lib_path('foo')}/.git" + G + bundle "install" + bundle "cache" + out.should match /Updating .gem files in vendor\/cache/ + end + + it "locks the gemfile" do + build_git "foo", :path => "file://#{lib_path('foo')}/.git" + + install_gemfile <<-G + gem "foo", :git => "file://#{lib_path('foo')}/.git" + G + + bundle "cache" + bundled_app("Gemfile.lock").should exist + end + + it "caches the gems" do + build_git "foo", :path => "file://#{lib_path('foo')}/.git" + + install_gemfile <<-G + gem "foo", :git => "file://#{lib_path('foo')}/.git" + G + + bundle "cache" + pending "resolution of Bundler issue #67 (Github)" do + bundled_app("vendor/cache/foo-1.0.0.gem").should exist + end + end end end |