diff options
author | Andre Arko <andre@arko.net> | 2010-10-24 23:24:20 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2010-10-24 23:24:20 -0700 |
commit | 631ed17c0b1a0e796184832612d58fa73cfff8cd (patch) | |
tree | 91616e05cb4614d6f83726054e10181ceb8d1423 /spec/update | |
parent | 4aa308f09ea56bad5131c8a2d65883c28406392b (diff) | |
download | bundler-631ed17c0b1a0e796184832612d58fa73cfff8cd.tar.gz |
Simplify the crap out of the git remote builders
Diffstat (limited to 'spec/update')
-rw-r--r-- | spec/update/git_spec.rb | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb index a3ecb27b..7ff29c71 100644 --- a/spec/update/git_spec.rb +++ b/spec/update/git_spec.rb @@ -94,35 +94,26 @@ describe "bundle update" do out.should include("Your bundle is complete!") end - it "fetches tags from the remote" do - bare_mock_remote_git = build_bare_git lib_path("remote") - remote_name = 'bar' - - update_git "foo", :path => @git.path, - :remote => {:cmd => 'add', :name => remote_name, :args => "file://#{bare_mock_remote_git.path}"} - update_git "foo", :path => @git.path, - :remote => {:cmd => 'push', :name => remote_name} + it "fetches tags from the remote" do + build_git "foo" + @remote = build_git("bar", :bare => true) + update_git "foo", :remote => @remote.path + update_git "foo", :push => "master" install_gemfile <<-G - source "file://#{gem_repo2}" - gem 'foo', :git => "#{lib_path('remote')}" - gem 'rack' + gem 'foo', :git => "#{@remote.path}" G - update_git "foo", :path => @git.path, :branch => "bas" - update_git "foo", :path => @git.path, :remote => {:cmd => 'push', :name => remote_name, :ref => 'bas'} - update_git "foo", :path => @git.path, :tag => "fubar" - update_git "foo", :path => @git.path, :remote => {:cmd => 'push', :name => remote_name, :ref => 'fubar'} - update_git "foo", :path => @git.path, :remote => {:cmd => 'push', :name => remote_name, :ref => ':bas'} + # Create a new tag on the remote that needs fetching + update_git "foo", :tag => "fubar" + update_git "foo", :push => "fubar" gemfile <<-G - source "file://#{gem_repo2}" - gem 'foo', :git => "#{lib_path('remote')}", :tag => "fubar" - gem 'rack' + gem 'foo', :git => "#{@remote.path}", :tag => "fubar" G - bundle("update", :exitstatus => true) + bundle "update", :exitstatus => true exitstatus.should == 0 end |