Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8904

Show
Ignore:
Timestamp:
02/19/08 23:37:50 (5 months ago)
Author:
minam
Message:

make the tests pass again

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/capistrano/test/deploy/scm/git_test.rb

    r8759 r8904  
    2323    @config[:repository] = "git@somehost.com:project.git" 
    2424    dest = "/var/www" 
    25     assert_equal "git clone git@somehost.com:project.git /var/www && cd /var/www && git checkout -b deploy HEAD", @source.checkout('Not used', dest) 
     25    assert_equal "git clone git@somehost.com:project.git /var/www && cd /var/www && git checkout HEAD", @source.checkout('Not used', dest) 
    2626 
    2727    # With branch 
    2828    @config[:branch] = "origin/foo" 
    29     assert_equal "git clone git@somehost.com:project.git /var/www && cd /var/www && git checkout -b deploy origin/foo", @source.checkout('Not used', dest) 
     29    assert_equal "git clone git@somehost.com:project.git /var/www && cd /var/www && git checkout origin/foo", @source.checkout('Not used', dest) 
    3030  end 
    3131 
     
    5252  def test_sync 
    5353    dest = "/var/www" 
    54     assert_equal "cd #{dest} && git fetch origin && git merge origin/HEAD", @source.sync('Not used', dest) 
     54    assert_equal "cd #{dest} && git fetch origin && git checkout origin/HEAD", @source.sync('Not used', dest) 
    5555 
    5656    # With branch 
    5757    @config[:branch] = "origin/foo" 
    58     assert_equal "cd #{dest} && git fetch origin && git merge origin/foo", @source.sync('Not used', dest) 
     58    assert_equal "cd #{dest} && git fetch origin && git checkout origin/foo", @source.sync('Not used', dest) 
    5959 
    6060    # With :scm_command 
    6161    @config[:scm_command] = "/opt/local/bin/git" 
    62     assert_equal "cd #{dest} && /opt/local/bin/git fetch origin && /opt/local/bin/git merge origin/foo", @source.sync('Not used', dest) 
     62    assert_equal "cd #{dest} && /opt/local/bin/git fetch origin && /opt/local/bin/git checkout origin/foo", @source.sync('Not used', dest) 
    6363  end 
    6464 
     
    6767    @config[:git_shallow_clone] = 1 
    6868    dest = "/var/www" 
    69     assert_equal "git clone --depth 1 git@somehost.com:project.git /var/www && cd /var/www && git checkout -b deploy HEAD", @source.checkout('Not used', dest) 
     69    assert_equal "git clone --depth 1 git@somehost.com:project.git /var/www && cd /var/www && git checkout HEAD", @source.checkout('Not used', dest) 
    7070 
    7171    # With branch 
    7272    @config[:branch] = "origin/foo" 
    73     assert_equal "git clone --depth 1 git@somehost.com:project.git /var/www && cd /var/www && git checkout -b deploy origin/foo", @source.checkout('Not used', dest) 
     73    assert_equal "git clone --depth 1 git@somehost.com:project.git /var/www && cd /var/www && git checkout origin/foo", @source.checkout('Not used', dest) 
    7474  end 
    7575