Sha256: 40aaf22560826913d2041a48fe76f0acdf1e061d0c943d8d7ba10149f0724ca8

Contents?: true

Size: 1.22 KB

Versions: 13

Compression:

Stored size: 1.22 KB

Contents

require "utils"
require 'capistrano/recipes/deploy/scm/darcs'

class DeploySCMDarcsTest < Test::Unit::TestCase
  class TestSCM < Capistrano::Deploy::SCM::Darcs
    default_command "darcs"
  end
  def setup
    @config = { :repository => "." }
  #  def @config.exists?(name); key?(name); end

    @source = TestSCM.new(@config)
  end

  # We should be able to pick a specific hash.
  def test_checkout_hash
    hsh = "*version_hash*"
    assert_match(%r{--to-match=.hash #{Regexp.quote(hsh)}},
                 @source.checkout(hsh, "*foo_location*"),
                "Specifying a revision hash got the --to-match option wrong.")
  end

  # Picking the head revision should leave out the hash, because head is the
  # default and we don't have a HEAD pseudotag
  def test_checkout_head
    hsh = @source.head
    assert_no_match(%r{--to-match}, @source.checkout(hsh, "*foo_location*"),
                    "Selecting the head revision incorrectly produced a --to-match option.")
  end

  # Leaving the revision as nil shouldn't break anything.
  def test_checkout_nil
    assert_no_match(%r{--to-match}, @source.checkout(nil, "*foo_location*"),
                    "Leaving the revision as nil incorrectly produced a --to-match option.")
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
capistrano-2.15.11 test/deploy/scm/darcs_test.rb
capistrano-2.15.10 test/deploy/scm/darcs_test.rb
capistrano-2.15.9 test/deploy/scm/darcs_test.rb
capistrano-2.15.8 test/deploy/scm/darcs_test.rb
capistrano-2.15.7 test/deploy/scm/darcs_test.rb
capistrano-2.15.6 test/deploy/scm/darcs_test.rb
capistrano-2.15.5 test/deploy/scm/darcs_test.rb
minmb-capistrano-2.15.4 test/deploy/scm/darcs_test.rb
capistrano-2.15.4 test/deploy/scm/darcs_test.rb
capistrano-2.15.3 test/deploy/scm/darcs_test.rb
capistrano-2.15.2 test/deploy/scm/darcs_test.rb
capistrano-2.15.0 test/deploy/scm/darcs_test.rb
capistrano-2.15.1 test/deploy/scm/darcs_test.rb