Sha256: 2280e8053b056d53ac3acbdff2ac9784ef4908932b4778f214484a46d6a7290b

Contents?: true

Size: 1.22 KB

Versions: 55

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

55 entries across 55 versions & 3 rubygems

Version Path
capistrano-2.5.22 test/deploy/scm/darcs_test.rb
capistrano-2.14.2 test/deploy/scm/darcs_test.rb
capistrano-2.14.1 test/deploy/scm/darcs_test.rb
capistrano-2.13.5 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.28 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.27 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.26 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.25 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.24 test/deploy/scm/darcs_test.rb
capistrano-2.12.0 test/deploy/scm/darcs_test.rb
capistrano-2.11.2 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.23 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.22 test/deploy/scm/darcs_test.rb
HeSYINUvSBZfxqA-capistrano-2.5.21 test/deploy/scm/darcs_test.rb
capistrano-2.9.0 test/deploy/scm/darcs_test.rb
capistrano-2.8.0 test/deploy/scm/darcs_test.rb
capistrano-2.7.0 test/deploy/scm/darcs_test.rb
capistrano-2.6.1.pre test/deploy/scm/darcs_test.rb
capistrano-2.6.0 test/deploy/scm/darcs_test.rb
capistrano-2.5.21 test/deploy/scm/darcs_test.rb